[klibc] [PATCH] Escape DHCP options written to /tmp/net-$DEVCICE.conf

Ulrich Dangel uli at spamt.net
Thu Apr 21 09:00:58 PDT 2011


* H. Peter Anvin wrote [21.04.11 17:27]:
> On 04/21/2011 07:39 AM, Ulrich Dangel wrote:
> > * maximilian attems wrote [21.04.11 16:05]:
> > Hi,
> >> "There is actually a much better way to escape shell variables, a trick I
> >> learned from git: Always start with a single quote ('), then leave all
> >> characters except ' and ! unchanged.  For those two characters, emit the
> >> sequence '\'' or '\!' Including the single quotes" -hpa
> >  
> > Why escape !? There is AFAIK no history expansion within single quotes.
> 
> Not for bash, but if someone uses a csh derivative, there is.

Ok, I'll escape ! too. JFTR I'm not really familiar with csh shells but
/tmp/net-$IFACE.conf is AFAIK already not csh compatible as
variables are not defined via set. 

Ulrich
-- 
twitter: @mr_ud  | identica: @mru
IRCNet:  mru     | freenode: mrud



More information about the klibc mailing list