[ale] Bash script help

Geoffrey esoteric at 3times25.net
Tue Aug 22 09:16:02 EDT 2006


Jim Seymour wrote:
> Okay, I am trying to build my own backup script and running into an
> error trying to pipe mkisofs into cdrecord. I am getting a command not
> found on the cdrecord part. This is a bash script and the problem line
> is below.
> 
> MKCD="mkisofs -J -R -V "$(date '+%a %F')" $TDIR$IBALL" | "cdrecord
> blank=fast driveropts=singlesession,burnfree -"
> 
> The MKCD is being called as a variable in the script. I have not benn
> able to find out why the pipe fails. Ideas?

First of all, what you have above is basically setting MKCD to:

"mkisofs -J -R -V "$(date '+%a %F')" $TDIR$IBALL"

And then piping that to:

"cdrecord blank=fast driveropts=singlesession,burnfree -"

Which I suspect will effectively leave MKCD empty and produce an error 
something like:

bash: cdrecord blank=fast driveropts=singlesession,burnfree -: command 
not found

You'll need to enclose the whole string of stuff that you want to be 
contained in the variable in quotes and escape any internal quotes you 
want to retain.

-- 
Until later, Geoffrey

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
  - Benjamin Franklin



More information about the Ale mailing list