HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script in csh
Operating System - HP-UX
        1839879
        Members
    
    
        3285
        Online
    
    
        110156
        Solutions
    
Forums
        Categories
Company
Local Language
                
                  
                  back
                
        
                
        
                
        
                
        
        
        
                
        
                
        
        
        
                
        
              
              Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
                
                  
                  back
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
            
                
            
                
            
                
            
                
            
            
                
            
                
            
            
                
            
                
              
            Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
        Information
        Community
Resources
Community Language
        Language
        Forums
Blogs
	
		
			
            
                
            Go to solution
        
            
		
		
			
            	
	
		
        
		
	
	
		Topic Options
			
				
					
	
			
		
	- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2001 08:17 AM
04-23-2001 08:17 AM
			
				
					
					
						Hello,
I'm working again with csh scripts, now if have to put one if... I need compare if $VAR1 <= $VAR2, but I don't find some information about it.
It try about some differents like, for example:
--------------------------
set VAR1 = 10
set var2 = 20
if ($VAR1 <= $VAR2)
then
echo $VAR1
else
echo $VAR2
endif
---------------------------
but it doesn't works fine.
Could you help me? o tell me some link with some information about csh scripts???
Thanks a lot of.
Carmen.
	
			
				
		
			
			
			
			
			
			
		
		
		
	
	
	
I'm working again with csh scripts, now if have to put one if... I need compare if $VAR1 <= $VAR2, but I don't find some information about it.
It try about some differents like, for example:
--------------------------
set VAR1 = 10
set var2 = 20
if ($VAR1 <= $VAR2)
then
echo $VAR1
else
echo $VAR2
endif
---------------------------
but it doesn't works fine.
Could you help me? o tell me some link with some information about csh scripts???
Thanks a lot of.
Carmen.
	Users are not too bad ;-)
			
			
				Solved! Go to Solution.
		3 REPLIES 3
	
	            
            
		
		
			
            
                - Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2001 08:27 AM
04-23-2001 08:27 AM
Solution
			
				
					
					
						Hi:
Try this guide as a resource in addition to the man pages ('man csh'):
http://docs.hp.com/hpux/onlinedocs/B2355-90046/B2355-90046.html
...JRF...
		
		
	
	
	
Try this guide as a resource in addition to the man pages ('man csh'):
http://docs.hp.com/hpux/onlinedocs/B2355-90046/B2355-90046.html
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2001 08:41 AM
04-23-2001 08:41 AM
			
				
					
						
							Re: Script in csh
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						I hate csh but you need to move 'then' to the
same line as the if (expression) and all is well.
		
		
	
	
	
same line as the if (expression) and all is well.
	If it ain't broke, I can fix that.
			
			
				
			
			
			
			
			
			
		- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2001 09:22 AM
04-23-2001 09:22 AM
			
				
					
						
							Re: Script in csh
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Furthermore, the "set var2 = ..." should be "set VAR2 = ...".
P.S. csh is a terrible language for writing scripts. If possible,
please consider using the POSIX shell (sh) or Korn shell (ksh)
or almost anything else besides csh.
http://www.perl.com/pub/language/versus/csh.html
(Some of the bugs listed may have been fixed by individual
vendors, and tcsh seems to have fixed many of them.)
		
		
	
	
	
P.S. csh is a terrible language for writing scripts. If possible,
please consider using the POSIX shell (sh) or Korn shell (ksh)
or almost anything else besides csh.
http://www.perl.com/pub/language/versus/csh.html
(Some of the bugs listed may have been fixed by individual
vendors, and tcsh seems to have fixed many of them.)
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
		
	
	
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP
