Welcome to WebmasterWorld Guest from 54.226.133.245

Forum Moderators: bakedjake

Message Too Old, No Replies

head and tail commands

     
8:58 am on Mar 11, 2004 (gmt 0)

New User

10+ Year Member

joined:Mar 11, 2004
posts:6
votes: 0


Hi,

i wanted to as to how can i display the lines 25 through 75 lines using head,tail commands.as using head or tail we cannot give the range.

$tail +25 abc.sh

please reply to me at the earliest.

9:45 am on Mar 11, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 8, 2003
posts:65
votes: 0


If you have to use the head and tail command just do this...

head -75 <file> ¦ tail -50

11:00 pm on Mar 11, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Oct 28, 2002
posts:492
votes: 0


Real unix people use sed:

sed -n 25,75p you-file-here

René