The script command executes and records logs.
( http://www.computerhope.com/unix/uscript.htm )
( http://linuxers.org/article/script-command-line-tool-recordsave-your-terminal-activity )
I use script command for saving commands and those output.
Whenever using 'script', I type commands like followings.
$ script result.log
Script started, file is result.log
$ date
$ ls -la.
$ exit
Sometimes I want to use those command with shell script.
So I run like following.
$ script -c test.sh result.log
But the result.log has only output, it doesn't contain command itself. I want the result.log to include commands and output.
How can I do it?
Thanks