Computing.Net > Forums > Unix > urgent help in sed

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

urgent help in sed

Reply to Message Icon

Name: srakesh
Date: August 16, 2005 at 23:17:52 Pacific
OS: windows xp
CPU/Ram: 256 mb ram
Comment:

hi...
i want to know how can i take away a portion of a file using sed..if i have 100 records in a file , i want to take away 10 records and place it in a file...then , for every 10 records i should create a new file and place those records in that file..please reply



Sponsored Link
Ads by Google

Response Number 1
Name: Luke Chi
Date: August 17, 2005 at 05:37:53 Pacific
Reply:

use split command

Luke Chi


0

Response Number 2
Name: Luke Chi
Date: August 17, 2005 at 06:14:08 Pacific
Reply:

split -l 10 input.txt

and, the new files will be generated in the working directory, like:

xaa, xab, xac, ...


Luke Chi


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


tape backup remotely Using while loop to read ...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: urgent help in sed

parameters in sed www.computing.net/answers/unix/parameters-in-sed/6942.html

How to use if/else logic in sed/awk www.computing.net/answers/unix/how-to-use-ifelse-logic-in-sedawk/6207.html

Urgent HELP. capture exit code Perl www.computing.net/answers/unix/urgent-help-capture-exit-code-perl/6367.html