All post scriplets, but if you just need to read the first 10 lines from the command line, there are shorter ways to achive that goal
$ head -10 file
$ perl -ne'1..10 and print' file
The advantage of the perl way is that you can also easily get stuff from the middle, say printl only line 12345:
$ perl -ne'12345..12345 and print' file
Enjoy, Have FUN! H.Merijn
|