[TriLUG] scripting question

Scott Lambdin lopaki at gmail.com
Tue Mar 15 17:05:24 EDT 2011


add 2>&1 after /dev/null?  to also send stderr to the bitbucket

On Tue, Mar 15, 2011 at 4:13 PM, Chris Merrill <chris at webperformance.com>wrote:

> The FLAC>MP3 converter script I posted about earlier has one annoying
> little
> behavior.  It spews a lot of crap to the screen.  I am somewhat confident
> it
> comes from this line:
>
> if ! lame --genre-list | grep "${command[$((i+1))]}" >/dev/null; then
>        command[$((i+1))]=""
>        [ "$verbose" ] && echo "Nullified the genre tag as the specified
> genre does not exist."
> fi
>
> where command[$((i+1))] is some parameter it is looking for in the output
> from
> the "lame --genre-list" command.
>
> I think the output from "lame --genrelist" was supposed be grepped and all
> output piped to null, but it is appearing on the console anyway.
>
> Can anyone suggest a modification to the above code that would keep the
> output
> from reaching the console (except the echo, of course) ?   I should
> probably
> dig up some bash scripting references figure this out myself...but I'm
> supposed
> to be working right now   ;)
>
>
>
>
> --
> ------------------------------------------------------------------------ -
> Chris Merrill                           |  Web Performance, Inc.
> chris at webperformance.com                |  http://webperformance.com
> 919-433-1762                            |  919-845-7601
>
> Web Performance: Website Load Testing Software & Services
> ------------------------------------------------------------------------ -
> --
> This message was sent to: Scott Lambdin <lopaki at gmail.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that
> address.
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web  :
> http://www.trilug.org/mailman/options/trilug/lopaki%40gmail.com
> TriLUG FAQ          :
> http://www.trilug.org/wiki/Frequently_Asked_Questions
>



-- 
There's a box?



More information about the TriLUG mailing list