The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 4.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-18-2009
Sepia Sepia is offline
Registered User
  
 

Join Date: Apr 2007
Location: England
Posts: 49
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
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:34 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0