![]() |
|
|
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 |
| Parsing text from file | ndnkyd | Shell Programming and Scripting | 0 | 04-02-2008 02:42 AM |
| Need help in parsing text file contents | Alecs | Shell Programming and Scripting | 0 | 03-30-2008 01:58 PM |
| Text File Parsing | Djlethal | Shell Programming and Scripting | 2 | 02-27-2008 03:31 AM |
| Parsing comma delimited text file | chengwei | Shell Programming and Scripting | 5 | 02-23-2007 05:38 AM |
| Parsing Lines from a text file | sallender | Shell Programming and Scripting | 3 | 08-26-2005 12:11 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
One way....I was nice and didn't put it in my standard csh...
#!/bin/ksh file="file1" while read -r xx do if [ "$xx" = "unix" ] then file="file2"; else echo "$xx" >> $file ; fi done < $1 Original file has what you mentioned. File1 ends up with 1 2 3 4 File2 ends up with 5 6 7 8 If you want the 'unix' in one of the files, just move the echo or add another. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|