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

Editorial / Best Answer

Answered by: Suman Saha

  • Jun 27th, 2005


cat filename.txt | cut -c 10-20

Showing Answers 1 - 38 of 38 Answers

Suman Saha

  • Jun 27th, 2005
 

cat filename.txt | cut -c 10-20

Ramakrishna Choudarapu

  • Nov 4th, 2005
 

cut -c10-20 <filename.txt>

Naresh

  • May 2nd, 2012
 

cat file_name | cut -c 10-20

  Was this answer useful?  Yes

Jagadeesh

  • May 30th, 2012
 

cut -c 10-20 filename

  Was this answer useful?  Yes

Ming

  • Jun 8th, 2012
 

sed -n 25p file_name

  Was this answer useful?  Yes

Tigran Petrosyan

  • Oct 24th, 2014
 

sed -n 10,20p file.txt

  Was this answer useful?  Yes

Mohit

  • Nov 14th, 2014
 

Code
  1.  awk { print substr($0,10,10) } file_name

  Was this answer useful?  Yes

mays

  • Mar 1st, 2015
 

sed -n 1p file.txt|cit -c 10,20

  Was this answer useful?  Yes

Partha

  • Jul 30th, 2015
 

sed -n 10,20p file.txt

  Was this answer useful?  Yes

Ashish kumar

  • Aug 6th, 2015
 

cat main2.c | head -20 | tail -10

  Was this answer useful?  Yes

Bharat

  • Sep 21st, 2015
 

cat 1.txt | cut -c 10-20.
The question is about the character positions and not the lines from 10 to 20

  Was this answer useful?  Yes

Anil Kumar

  • Feb 3rd, 2016
 

cut -c 10-20 filename

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions