[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

help with scripting



Hi there all

I have writing a script to reboot my Linux 5.2 box. This part works ok,
but I want to have the error messages append to a log file with a time
stamp next to the error message.

Here is my script

#!/bin/bash
#
time_stamp=`date +"%c"`
cd /
exec nohup /sbin/shutdown -r -y 1 > /dev/console 1>&- 2>> $time_stamp
/root/error.log&- &.

Thank you all
Wayne



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]