This executes the date command via shell script and logs it to the specified file with current pid.
#!/bin/bash
LOG=$$.log
exec > $LOG 2>&1
date
- sandip's blog
- Login or register to post comments
This executes the date command via shell script and logs it to the specified file with current pid.
#!/bin/bash
LOG=$$.log
exec > $LOG 2>&1
date