Re: [Bashburn-info] cdrecord OPTIONS dump
Brought to you by:
bashburn
From: Nick W. <ni...@uk...> - 2008-10-08 07:20:37
|
On Tue, 7 Oct 2008 22:48:22 -0400 (EDT) "Steven W. Orr" <st...@sy...> wrote: > > The reason is that that command writes to stderr and not to stdout. > So, if you want your command to pipe its stderr to grep you have to > say this: > > cdrecord dev=/dev/<your_drive> driveropts=help -checkdrive 2>&1 | \ > grep -i Driver > > which sez in English: "run the command and dup(2) stderr onto stdout > and close stderr. Then take the combined stderr and stdout that is > now on stdout and pipe it to grep." > > Make sense? Yes, I think we all know about that... but it wasn't something I thought about. Anyway, it still is peculair. The line below NOW only prints out Driver Options (I guess 20 lines will be enough) but still have to dump to /dev/null. cdrecord dev=/dev/<you_drive> driveropts=help -checkdrive 2>&1 > /dev/null | grep -A 20 "Driver options" Please test this line - if it works for all of us, I guess it could be used to only print out drivers options. Nick -- Free Software Foundation Associate Member 5508 |