Hey all,
I'm trying to make a script to execute a bunch of commands and output the results to a text file. I managed to get most of it done except, commands with arguments when entered by themselves. I want to find a way to also output the arugments if possible.
Here's an example
text.txt looks like:
when you type awk without arguments you get something like this..
I need text.txt to output the arguments as above. If anyone could please let me know if this is possible that would be super awesome.
Thank You.
I'm trying to make a script to execute a bunch of commands and output the results to a text file. I managed to get most of it done except, commands with arguments when entered by themselves. I want to find a way to also output the arugments if possible.
Here's an example
Code:
awk | tee -a /Desktop/test.txt | echo "******** AWK ********" >> /Users/name/Desktop/test.txt
text.txt looks like:
Code:
******** AWK ********
Code:
$ awk
usage: awk [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]
$
Thank You.