Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying few records only

Status
Not open for further replies.

manmaria

Technical User
Aug 8, 2003
286
0
0
US
How to copy few records only from one file like first 100 records and from 101 to 200 records?

Thanks
Manmaria
 
from 101 to 200 records
sed -n '101,200p' /path/to/input > output
or the awk way:
awk 'NR>=101 && NR<=200' /path/to/input > output
or head | tail
Anyway feel free to play with the man command.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
look at the dd command
man dd

you have parms to skip, and process a number of records
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top