vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| We are doing batch script for backup. The server is IBM RS/6000 AIX 4.3.3 version. The script supportly should show backup messages on monitor screen and also on log file. I test the script and look like "tee" does NOT put screen messages to file. my backup script are: for i in `cat /home/backup/lvdir` do /usr/sbin/backup -0 -u -f /dev/rmt1.1 $i |tee -a /tmp/backup.log echo "* \n" >>/tmp/backup.log echo "* End of backup file system: $i \n" >>/tmp/backup.log echo "********************************** \n" >>/tmp/backup.log echo "* \n" >>/tmp/backup.log done Any ideal? Thanks. |
| |||
| Are you sure that those backup messages are not sent to stderr ? If yes, you can redirect also stderr with .... backup ... $i 2>&1 | tee -a ... aaa a écrit: > > We are doing batch script for backup. The server is IBM RS/6000 AIX 4.3.3 > version. The script supportly should show backup messages on monitor screen and > also on log file. I test the script and look like "tee" does NOT put screen > messages to file. > > my backup script are: > > for i in `cat /home/backup/lvdir` > do > /usr/sbin/backup -0 -u -f /dev/rmt1.1 $i |tee -a /tmp/backup.log > echo "* \n" >>/tmp/backup.log > echo "* End of backup file system: $i \n" >>/tmp/backup.log > echo "********************************** \n" >>/tmp/backup.log > echo "* \n" >>/tmp/backup.log > done > > Any ideal? > > Thanks. |
| ||||
| "aaa" <mccdba@yahoo.com> wrote in message news:cqpti301dq3@drn.newsguy.com... > We are doing batch script for backup. The server is IBM RS/6000 AIX 4.3.3 > version. The script supportly should show backup messages on monitor screen and > also on log file. I test the script and look like "tee" does NOT put screen > messages to file. > > my backup script are: > > for i in `cat /home/backup/lvdir` > do > /usr/sbin/backup -0 -u -f /dev/rmt1.1 $i |tee -a /tmp/backup.log Use the full path to tee and it should work. Doug stuff deleted ..... |
| Thread Tools | |
| Display Modes | |
|
|