cdrecord scripting question.

From: Wayne Pinette (Wpinette_at_cariboo.bc.ca)
Date: 09/03/04

  • Next message: diego.veiga_at_embraer.com.br: "RE: ssh prompt timeout"
    Date: Fri, 03 Sep 2004 08:29:36 -0700
    To: redhat-list@redhat.com
    
    

    Howdy all, I have a sh/bash/csh scripting question regarding cdrecord

    I have a system here who's owner wants to do daily backups to cd rw
    cd's. I wrote a script to do
    this using cdrecord (make the iso file first, then burn it to cd) and
    it works famously except for one
    small and annoying problem.

    I try to log everything I do and then print off the log. Unfortunately
    the output I get from
    cdrecord is not actually going to the log file so there is no
    information as whether the backup was
    successful or not, which makes the printout pretty much useless.

    The script is as follows :

    #!/bin/sh
    echo " " >/tmp/backup.log
    echo 'Starting Backup: ' `date` >>/tmp/backup.log
    echo " " >>/tmp/backup.log
    echo "blanking cd...">>/tmp/backup.log
    echo `cdrecord dev=0,0,0 blank=all` >> /tmp/backup.log
    echo ' ' >> /tmp/backup.log
    echo "making /tmp/backup.ios">>/tmp/backup.log
    echo `mkisofs -R -o /tmp/backup.iso /home` >> /tmp/backup.log
    echo ' ' >>/tmp/backup.log
    echo "burning cd...">>/tmp/backup.log
    echo `cdrecord -v dev=0,0,0 /tmp/backup.iso` >>/tmp/backup.log
    echo ' '>>/tmp/backup.log
    echo 'Finished Backup: '`date`>>/tmp/backup.log
    echo " ">>/tmp/backup.log
    lp -d roland -o InputSlot=Tray1 /tmp/backup.log

    If I do these commands at command line, pertinent (and unfortunately
    curses style) information is spit out, but it is not caught in my echo
    `` calls.
    Anyone have any ideas? I must admit i have enough shell scripting
    syntax knowledge to be mostly dangerous to myself and others :-)

    Wayner

    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: diego.veiga_at_embraer.com.br: "RE: ssh prompt timeout"

    Relevant Pages

    • Re: Heres how easy it is
      ... Closing the web browser is an event that can be detected in Javascript ... it is a version of Windows and one that includes taskkill.exe then you ... I normally want scripting enabled in the web browser because far too ... @echo off ...
      (alt.comp.anti-virus)
    • Re: PC Pitstop tests?
      ... I don't know about an add-on to IE that lets the user quickly and easily ... Whether scripting is enabled or not for IE is a registry setting (but having ... @echo off ... So I don't have an add-on for disabling/enabling scripting in IE but a ...
      (alt.comp.hardware.pc-homebuilt)
    • Re: How to block these Facebook and Twitter widgets?
      ... You'll have to disable scripting to make them go ... variable) and the batch file is called noscriptIE.bat, ... @echo off ... so prevalent in web pages that carte blanch disabling of scripting in ...
      (microsoft.public.windowsxp.general)
    • Re: Backing Up Exchange Data
      ... The SBS backup wizard is infinitely easier to manage and doesn't require scripting. ... Run an NTBackup *without* running the second script to push the ..bkf to the online service. ... However, for redundance, I would like to backup my Exchange ...
      (microsoft.public.windows.server.sbs)
    • Re: Create a Shell Object in ASP
      ... different Scripting Host. ... would come in handy if we could just do so by opening the web browser, ... forget something and then backup ... Aaron [SQL Server MVP] schrieb: ...
      (microsoft.public.inetserver.asp.general)