Re: [Q] tee does NOT put screen display to file ???

From: Jean-Marc Monnez (monnez.jean-marc_at_AGORA.MSA.FR)
Date: 12/28/04

  • Next message: Andrew Townsend: "Vmtune question. What is NaNQ% ?"
    Date:         Tue, 28 Dec 2004 10:30:39 +0100
    To: aix-l@Princeton.EDU
    
    
    

    Redirect the entire for loop results, and don't forget to mix stdout and
    stderr :

    for i in `cat /home/backup/lvdir`
    do
    /usr/sbin/backup -0 -u -f /dev/rmt1.1 $i
    echo "* \n"
    echo "* End of backup file system: $i \n"
    echo "********************************** \n"
    echo "* \n"
    done 2>&1 | tee -a /tmp/backup.log

    Regards

    -- JMM

    -----------------------------
    Jean-Marc MONNEZ
    MSA / AGORA / ATD
    monnez.jean-marc@agora.msa.fr
    -----------------------------

    bbb bb wrote :

    > We are doing batch script for backup. 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
    >
    > Thanks.

    
    


  • Next message: Andrew Townsend: "Vmtune question. What is NaNQ% ?"

    Relevant Pages

    • Re: "New" ZFS crash on FS (pool?) unmount/export
      ... the box stopped responding to pings at 02:07AM and it has a cron backup job using zfs send/recv at 02:00, so I'm guessing it's related, even though the backup probably should have finished before then... ... Essentially, it creates a GEOM provider of a file, containing a zpool, imports the pool and creates a clone to it, and then exports the pool. ... Every time it crashes it seems to be during or very soon after the export - only this time it didn't even take the snapshots. ... echo Creating ggate device ...
      (freebsd-current)
    • RE: NT Backup inconsistent medium
      ... I would configure the backup with NTBackup and set a schedule from there. ... | directory's to a tape with NT backup it works fine. ... | @ECHO Off ... | REM Script gebaseerd op NT Backup ...
      (microsoft.public.windows.server.sbs)
    • Robocopy fails sporadically
      ... if errorlevel 16 echo FATAL ERROR on BACKUP of %~n0's DATA>> ... if errorlevel 8 echo FAILED COPIES on BACKUP of %~n0's DATA>> ...
      (microsoft.public.windows.server.general)
    • Re: Quantum tape drive
      ... eject tapes any more) with a new Quantum DLT-4 drive. ... the backup script and output from camcontrol follows. ... echo "Tape archives:" ...
      (freebsd-questions)
    • Quantum tape drive
      ... I am trying to replace an older DLT tape drive (which doesn't like to ... I changed my backup script to include a -v flag in the tar command, ... the backup script and output from camcontrol follows. ... echo "Tape archives:" ...
      (freebsd-questions)