venus86
09-11-2001, 02:39 PM
i need to grep for something in a file and have it print the output to a text file in my home directory. i can't for the life of me figure out how to do this.
i'm in /etc/httpd/conf directory trying:
grep .com httpd.conf | cp /home/venus/com.txt
said no destination, that's true...
grep .com httpd.conf | /home/venus/com.txt
broken pipe...
yet if i do just grep .com httpd.conf it works but prints to the screen.
i know this has got to be simple to do. i thought it would create the .txt file on the fly but when i got errors i even went in and created a blank com.txt file for it to write to but nothings worked.
can anyone please help?
i'm in /etc/httpd/conf directory trying:
grep .com httpd.conf | cp /home/venus/com.txt
said no destination, that's true...
grep .com httpd.conf | /home/venus/com.txt
broken pipe...
yet if i do just grep .com httpd.conf it works but prints to the screen.
i know this has got to be simple to do. i thought it would create the .txt file on the fly but when i got errors i even went in and created a blank com.txt file for it to write to but nothings worked.
can anyone please help?