A bash script that saves timestamped console output to a namespaced directory. It uses tee
to read from stdin and write to the file.
Save script to somewhere in your $PATH
.
cat /lots/of/output | lawg output-name
lawg
allows you to run the same command many times while saving all the console output to a directory with your output-name
namespace.
Each file generated is timestamped.
By default, the output is put in your /tmp
directory. That can be modified by providing an alternate directory path with the -d
flag:
cat /lots/of/output | lawg output-name -d ~/Documents