[Ilugc] viewing specific lines of file

  • From: carti@xxxxxxxxxxxxxx (carti)
  • Date: Wed Jul 27 14:09:47 2005

Hi Bharathi,

Thanks for the neat workaround.

If you come to know any other utility like cat,grep,egrep,fgrep
more,less etc which can do the same functionality please let me know.

Thanks and Regards,
carti

On Wed, 27 Jul 2005, Bharathi Subramanian wrote:

On Wed, 27 Jul 2005, carti wrote:

I would like to view specific lines (range given in command line) of
a file. Say for example, I want to view line numbers 27 to 39 of
file file.txt.

Use Head and Tail

$ head -n 39 file.txt | tail -n 12

39 - 27 = 12.

HTH :)
--
Bharathi S

Other related posts: