Tagged Questions
2
votes
3answers
87 views
Output to stdout and at the same time grep into a file
I have a script that outputs text to stdout. I want to see all this output in my terminal, and at the same time I want to filter some lines and save them in a file. Example:
$ myscript
Line A
Line B
...
5
votes
2answers
395 views
Wrapping a shell script with tee
There is a bash script which prints some logs and allows some arguments. The script prints the logs to STDOUT.
Let's say the script's name is AAA.sh
I'd also like to make the script to print the logs ...
5
votes
1answer
265 views
Is it possible to “fork” STDOUT to two different locations? [duplicate]
Possible Duplicate:
Is there a way in bash to redirect output and still have it go to stdout?
Let's say I do:
ps -ef | grep httpd
to see if apache is running or not, but I also want to ...