Bash script logging
- Angelo Schalley
- Dec, 16, 2010
- Linux, Plesk Linux
- No Comments
use
>> mylog ( after the file, use > to overwrite )
to just append to the file
date >> mylog
ls >> mylog
echo >> mylog
OR if You want all script output go the mylog
#!/bin/bash
exec 1>>mylog
date
ls
echo