![]() |
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 |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| split based on the number of characters | chriss_58 | Shell Programming and Scripting | 6 | 07-06-2008 11:05 AM |
| Split a file based on pattern in awk, grep, sed or perl | kumarn | Shell Programming and Scripting | 5 | 06-20-2008 11:51 AM |
| Split a file with no pattern -- Split, Csplit, Awk | madhunk | UNIX for Dummies Questions & Answers | 10 | 12-17-2007 12:57 PM |
| extracting a line based on line number | narendra.pant | Shell Programming and Scripting | 2 | 09-20-2007 06:00 AM |
| awk script to split a file based on the condition | superprogrammer | Shell Programming and Scripting | 12 | 06-14-2005 04:59 AM |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
||||
|
Split File Based on Line Number Pattern
Hello all.
Sorry, I know this question is similar to many others, but I just can seem to put together exactly what I need. My file is tab delimitted and contains approximately 1 million rows. I would like to send lines 1,4,& 7 to a file. Lines 2, 5, & 8 to a second file. Lines 3, 6, & 9 to a third file, and then line 10 to a fourth file. I then want to repeat this condition using the same scenario, and the same four files above. Any thoughts on the best approach? |
| Bookmarks |
| Tags |
| split by line number, split to files |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|