![]() |
|
|
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 |
| AWK or KSH : Sort, Group and extract from 3 files | Matrix2682 | Shell Programming and Scripting | 3 | 08-21-2009 06:05 PM |
| Find all files with group read OR group write OR user write permission | shunter63 | Shell Programming and Scripting | 5 | 01-14-2009 01:06 PM |
| need help in remove group of files | ali560045 | Shell Programming and Scripting | 6 | 09-16-2008 08:16 AM |
| uncompress a group of files | ali560045 | Shell Programming and Scripting | 8 | 09-05-2008 03:02 AM |
| group by in files :-) | hellsd | UNIX for Dummies Questions & Answers | 10 | 06-22-2005 12:47 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
cat-ing a group of files into two outputs
I have some logic which uses CAT to concatenate group of files, 'SED'-ing some field values and piping the output to one file :-
cat `echo $infilename|sed '{ s/.filestream./'${file_stream}'/g s/.field2./'${jobopt2}'/g s/.sb_odate./'${SB_ODATE}'/g }'` >$outfilename Now I need to stream the output of that operation to two output files, conditional on the value of the first character of each line of the input files......if the first character is 7 or 8 write the record to one output and if not write it to the alternative output file I know I could read through the group of input files and add a grep........but can anyone suggest a way of doing it with just one read through the input ? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|