HPE GreenLake Administration
- Community Home
 - >
 - Servers and Operating Systems
 - >
 - Operating Systems
 - >
 - Operating System - Linux
 - >
 - File Editing
 
Operating System - Linux
        1840141
        Members
    
    
        2303
        Online
    
    
        110161
        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
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
 
06-14-2010 12:55 AM
06-14-2010 12:55 AM
			
				
					
						
							File Editing
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Hi 
I want to remove "^O" from a file
I removed "^L" using the command
#/bin/sed "s/^L//g" /home/fil1
which command will remove ^O?
		
		
	
	
	
I want to remove "^O" from a file
I removed "^L" using the command
#/bin/sed "s/^L//g" /home/fil1
which command will remove ^O?
		3 REPLIES 3
	
	            
            
		
		
			
            
                - Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
06-14-2010 01:04 AM
06-14-2010 01:04 AM
			
				
					
						
							Re: File Editing
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Hello.
Both sed and tr allow you to do this.
tr supports "\NNN" syntax to specify octal nubers.
sed understands "\cX" syntax to specify control characters (directly applicable to your scenario), as well as "\dXXX", "\oXXX" and "\xXX".
I recommend you read info pages for sed.
Regards,
Goran
		
		
	
	
	
Both sed and tr allow you to do this.
tr supports "\NNN" syntax to specify octal nubers.
sed understands "\cX" syntax to specify control characters (directly applicable to your scenario), as well as "\dXXX", "\oXXX" and "\xXX".
I recommend you read info pages for sed.
Regards,
Goran
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
06-14-2010 02:24 AM
06-14-2010 02:24 AM
			
				
					
						
							Re: File Editing
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						/bin/sed "s/^O//g" /home/file1 using this command it is not filtering "^O" (CtrlO)
Example of the file is given below please help me..
1^O^FH^SL1^R^24052010^1^D^PNEC002
2^BH^1^8^24Q^
		
		
	
	
	
Example of the file is given below please help me..
1^O^FH^SL1^R^24052010^1^D^PNEC002
2^BH^1^8^24Q^
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
06-14-2010 02:54 AM
06-14-2010 02:54 AM
			
				
					
						
							Re: File Editing
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Please read the documentation and make sure you understand it before repeating your question.
The solution is really trivial:
sed -e 's/\co//' ...
Goran
		
		
	
	
	
The solution is really trivial:
sed -e 's/\co//' ...
Goran
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