Sunday, December 27, 2009

How would you get the character positions 10-20 from a text file?

How would you get the character positions 10-20 from a text file?

cut -c10-20

Or

substring ${string_variable_name:starting_position:length}

Or

cat filename.txt | cut -c 10-20

No comments:

Post a Comment