help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] A do nothing function


From: Greg Wooledge
Subject: Re: [Help-bash] A do nothing function
Date: Fri, 28 Sep 2012 16:41:45 -0400
User-agent: Mutt/1.4.2.3i

On Fri, Sep 28, 2012 at 02:12:08PM -0600, Bob Proulx wrote:
> > >   filter() { sed /^eth/d;/^wlan/d;/^NetworkManager/d; }
> 
> Note missing quoting needed in the sed argument.

Ah, right. :(

> What would be likely to break?  It seems like six of one and a half
> dozen of the other...

The original statement was that a function is more flexible, and less
likely to break, than filter='some command'.  You can't put pipelines
or complex quoted arguments into a command that's in a variable.  This
is discussed in more detail at http://mywiki.wooledge.org/BashFAQ/050 .



reply via email to

[Prev in Thread] Current Thread [Next in Thread]