![]() |
|
|
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 |
| iTunes creates an empty library file in Windows | iBot | OS X Support RSS | 0 | 05-13-2009 04:00 AM |
| HP-Unix; .net application creates processes | NicoMan | HP-UX | 12 | 02-25-2009 01:50 PM |
| SCO 5.0.7 Cron creates files with 600, need 644 | 65bit | UNIX for Dummies Questions & Answers | 2 | 02-03-2009 01:01 PM |
| cp && rm command, rm: <file> not removed. No such file or directory | Leion | Shell Programming and Scripting | 5 | 01-19-2009 11:46 PM |
| awk/sed Command : Parse parameter file / send the lines to the ksh export command | rajan_san | Shell Programming and Scripting | 4 | 11-06-2008 01:29 PM |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
||||
|
Command that creates file and also greps that file?
I have a command that does something and then creates a log file (importlog.xml).
I then want to grep that newly created log (importlog.xml) file for a certain word (success). I then want to write that grep result to a new file (success.log). So far I can run the command which creates the file. I can also do the grep. However I cannot do them together in one command. Is it possible to create a file and then grep that file in the same command? This is my grep command which I have just put on the end of my other command which first created the file importlog.xml: | grep SUCCESS importlog.xml > SUCCESS.log The two commands are seperated using | pipe. Is this possible or does the grep have to be run seperately after the first command which creates the importlog.xml file? I am using Solaris. Thank you. |
| Bookmarks |
| Tags |
| grep |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|