Re: cdrecord scripting question.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wayne Pinette <Wpinette@xxxxxxxxxxxxx> writes:

> 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.

I didn't study your script but I suspect that some of what you want to
capture is coming out on STDERR.  If so it would print to tty but
would not be caught with > or >>.

Here is one suggestion that might help:

  To determine if this is a problem.
Run suspect commands like: `cmd 2> er'
Sending STDER to filename `er' (check er for output)

You might want to use an old trick I often use.  Use tee instead of > or >>.

the equivalent of `cmd >> filename' would be `tee -a filename'

What it does is print stuff to screen and to file.  You can see what
is happening better.

To capture STDERR into `tee' use this syntax.  STDERR will endup printed
to screen and to `file'.

cmd 2>&1|tee file 
  or
cmd 2>&1|tee -a file (to append)


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

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux