![]() |
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 |
| Read output of mii-tool | picoaeterna | Shell Programming and Scripting | 1 | 02-17-2008 07:27 PM |
| output string message to pipe | princelinux | High Level Programming | 3 | 08-18-2006 02:09 AM |
| Piping output to while read | Ultimodiablo | Shell Programming and Scripting | 3 | 11-26-2005 10:38 PM |
| store output to a file and read from it | afadaghi | Shell Programming and Scripting | 2 | 10-04-2005 12:00 PM |
| Output the message | ust | UNIX for Dummies Questions & Answers | 1 | 09-25-2005 08:35 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
read file and output message
hi,
I have a baby.txt file with two type of message: xxxxxxxx is missing xxxxxxxxxxx is not missing xxxx is missing xxxxxxxx is not missing xxxxxxxx is not missing For the above, I need to read file and get all "xxxx is missing" and write into baby_missing.txt. If no message "xxxxx is missing" in whole baby.txt, the script will write message "no file is missing in system" to baby_nomissing.txt is it possible? if yes..how? |
|
||||
|
Quote:
ksh: syntax error: `}' unexpected |
|
||||
|
Quote:
awk ' /is missing/ { flag=1;print > "baby_missing.txt" } mailx -c "`cat ccfile.txt`" -s \'"Missing tap file status $today'" "`cat tofile.txt`" < missing.msg END { if( flag != 1 ) print "no file is missing in system" > "baby_nomissing.txt" } ' baby.txt |
|
||||
|
Quote:
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| unix commands |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|