I would like to redirect the command executed along with the output to a file.
for example: #ls >ls_out.txt
ls_out.txt should be something like :
ls
file1 fil2
Thanks!
I would like to redirect the command executed along with the output to a file.
for example: #ls >ls_out.txt
ls_out.txt should be something like :
ls
file1 fil2
Thanks!
I use a function for this kind of thing:
Then
You could use "script" command: Something like this:
You will just have to get rid off "bash-3.2$ exit exit" piece.