Re: [Q] TEE does NOT put screen messages to log file???
From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 12/27/04
- Next message: Bryan Brock: "Re: Rate of Critical/Security Patches"
- Previous message: Chris F.A. Johnson: "Re: [Q] TEE does NOT put screen messages to log file???"
- In reply to: aaa: "[Q] TEE does NOT put screen messages to log file???"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 27 Dec 2004 17:01:10 -0500
In article <cqptj001dsa@drn.newsguy.com>, aaa <mccdba@yahoo.com> wrote:
> 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?
Two possibilities:
1) The messages you're not seeing in the file were written to stderr,
but you're only piping stdout. Try changing it to:
/usr/sbin/backup -0 -u -f /dev/rmt1.1 $i 2>&1 |tee -a /tmp/backup.log
2) Backup is writing messages directly to /dev/tty, not stdout. Expect
may come with a script that will capture this for you.
-- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***
- Next message: Bryan Brock: "Re: Rate of Critical/Security Patches"
- Previous message: Chris F.A. Johnson: "Re: [Q] TEE does NOT put screen messages to log file???"
- In reply to: aaa: "[Q] TEE does NOT put screen messages to log file???"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|