Re: [Bashburn-info] cdrecord OPTIONS dump
Brought to you by:
bashburn
From: Steven W. O. <st...@sy...> - 2008-10-08 14:56:48
|
On Wednesday, Oct 8th 2008 at 03:20 -0000, quoth Nick Warne: =>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. That works. -- steveo at syslang dot net TMMP1 http://frambors.syslang.net/ Do you have neighbors who are not frambors? Steven W. Orr |