GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Operating System  >  Shell Scripting
Go To First  |  Previous Question  |  Next Question 
 Shell Scripting  |  Question 13 of 47    Print  
How would you get the character positions 10-20 from a text file?

  
Total Answers and Comments: 3 Last Update: July 27, 2008   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Suman Saha
 
cat filename.txt | cut -c 10-20

Above answer was rated as good by the following members:
UncaAlby
June 27, 2005 07:19:11   #1  
Suman Saha        

RE: How would you get the character positions 10-20 from a text file?
cat filename.txt | cut -c 10-20
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
November 04, 2005 06:59:28   #2  
Ramakrishna Choudarapu        

RE: How would you get the character positions 10-20 fr...

cut -c10-20 <filename.txt>


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
July 26, 2008 23:15:20   #3  
yanan58 Member Since: July 2008   Contribution: 1    

RE: How would you get the character positions 10-20 from a text file?
substring ${string_variable_name:starting_position:length}
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 2Overall Rating: -2    


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape