The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 06-04-2008
appu1987 appu1987 is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 6
tail -f /root/var/log/ocmp/ocmpclient.log | grep 'File Detected\|File Sending\|File Recieved\|Disconnecting'

I am using the above command now i want to write the output of this to go to a file output.txt
so i modified it as
#!/bin/sh
while true
do
tail -f /root/var/log/ocmp/ocmpclient.log | grep 'File Detected\|File Sending\|File Recieved\|Disconnecting' > output.txt
done


Now the problem is the file is created but doesnt contain anything.