HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Scripting Parameter Passing ???
Operating System - HP-UX
        1839903
        Members
    
    
        4148
        Online
    
    
        110157
        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
03-27-2003 12:58 PM
03-27-2003 12:58 PM
			
				
					
					
						I have a script that reads a file similar to:
sql toe_translate_pkb.sql
sql toe_update_pkg.sql
sql tup_$translate_pkg.sql
etc.....
I do a read of the file picking up a parameter for each filed.
i.e. read dir file
I then have to pass these
parameters onto another script, and the problem I am having is the "$" in the filename on some files is being confused for the start of another parameter. So as an end result when I pass $file onto another script the 2nd script translates that to just "tup_"
How do I get around this so the whole file name is passed along ??
	
			
				
		
			
			
			
			
			
			
		
		
		
	
	
	
sql toe_translate_pkb.sql
sql toe_update_pkg.sql
sql tup_$translate_pkg.sql
etc.....
I do a read of the file picking up a parameter for each filed.
i.e. read dir file
I then have to pass these
parameters onto another script, and the problem I am having is the "$" in the filename on some files is being confused for the start of another parameter. So as an end result when I pass $file onto another script the 2nd script translates that to just "tup_"
How do I get around this so the whole file name is passed along ??
Solved! Go to Solution.
		3 REPLIES 3
	
	            
            
		
		
			
            
                - Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2003 01:03 PM
03-27-2003 01:03 PM
			
				
					
						
							Re: Scripting Parameter Passing ???
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Hi:
Escape the dollar sign character with a backslash, as for instance:
# echo \$translate_pkg.sql
Regards!
...JRF...
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
Escape the dollar sign character with a backslash, as for instance:
# echo \$translate_pkg.sql
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2003 01:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2003 01:06 PM
03-27-2003 01:06 PM
			
				
					
						
							Re: Scripting Parameter Passing ???
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Try using
read -r dir file
"-r" will force read not to interpret the "$".
HTH
-- Rod Hills
		
		
	
	
	
read -r dir file
"-r" will force read not to interpret the "$".
HTH
-- Rod Hills
	There be dragons...
			
			
				
			
			
			
			
			
			
		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
