Computing.Net > Forums > Unix > Single File to Many

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Single File to Many

Reply to Message Icon

Name: 18dreams
Date: August 11, 2005 at 05:59:17 Pacific
OS: Solaris
CPU/Ram: na
Comment:

Is there a way (sed, awk or other) to convert a file into several files using a pagebreak or other string to be used as the separator. Example - to convert a file into several files by using 3 blank lines as the delimiter, and having the files named temp.1, temp.2, temp.3 etc. I could use a loop, but that take such a long time to run through.

Thanks in advance.

Andy



Sponsored Link
Ads by Google

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

Use csplit command

Luke Chi


0

Response Number 2
Name: 18dreams
Date: August 11, 2005 at 11:08:30 Pacific
Reply:

Great!!! Thanks - never heard of this command before.

Thank you!


Andy


0

Response Number 3
Name: Luke Chi
Date: August 11, 2005 at 12:23:55 Pacific
Reply:

You're welcome

Luke Chi


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Creating user in AIX 5.2 Run a win32 file from map...



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: Single File to Many

Insert a line to many files www.computing.net/answers/unix/insert-a-line-to-many-files-/7125.html

files to configure ksh www.computing.net/answers/unix/files-to-configure-ksh/5659.html

variables from one file to another www.computing.net/answers/unix/variables-from-one-file-to-another/7378.html