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: 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: Saving DB to flash drive
      ... function to copy an open file, and found a long thread on the topic ... In my case, it is for an often-repeated, mid-day, hot backup ... > You can call a batch script using a command button that would copy your ... > @@echo off ...
      (microsoft.public.access.gettingstarted)
    • Re: [SLE] Bat files in Linux
      ... > I have a few commands that I would like to run at the command prompt. ... > In Windows I do this with a bat file that looks like the sample below. ... > ECHO Backup Menu ... > ECHO A. Flash Drive Backup J: ...
      (SuSE)
    • Re: Sanity check needed on an idea
      ... such-and-such server all day yesterday, why is it broken, and when is it going ... as well as a backup copy handy if you need 'em. ... # operate on that host. ... echo "Authenticating via SSH key id: ...
      (freebsd-questions)