![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Please Help:Need to Split the file into mutliple files depends on the KEY field value | arund_01 | UNIX for Dummies Questions & Answers | 14 | 04-23-2008 03:42 PM |
| Split file into multiple files depending upon first 4 digits | deepakgang | Shell Programming and Scripting | 4 | 04-09-2008 01:21 AM |
| Help Needed : Split one big file to multiple files | monicasgupta | Shell Programming and Scripting | 5 | 03-03-2008 07:09 PM |
| Split A File Into 2 Files | dummy_needhelp | Shell Programming and Scripting | 7 | 11-04-2007 07:36 PM |
| Split File into seperate files | eltinator | Shell Programming and Scripting | 4 | 08-03-2007 02:27 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Dear friends:
I have a datafile contains 1 to 40 lines or i can be varied between 1 to 40. I want to split the datafile into smaller files: if the datafile has 40 lines or more, file1 contains line 1 to 12 file2 contains line 13 to 25 file3 contains line 26 to 28 file4 contains line 29 to 40 (increment of 12) and if the datafile has 12 lines or less do nothing Please advise I got the idea of wc datafile if datafile > 12 lines save line1 to 12 > file1 save line13 to 25 > file .... if datafile <= 12 lines do nothing I am lack of experience of unix syntax.. Many thanks! |
|
||||
|
I tried SPLIT comand it worked great. I was able to choose lines number or number characters.
Thank you very much all the friends to take the time to helps! |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|