autoconf
[Top][All Lists]
Advanced

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

Re: config.status - robust sed substitutions


From: Andreas Schwab
Subject: Re: config.status - robust sed substitutions
Date: Wed, 26 Feb 2003 23:17:43 +0100
User-agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.3.50

Robert Anderson <address@hidden> writes:

|> Yep.  Both problems ostensibly fixed below.  Can someone get this to
|> fail using their favorite crappy sh implementation?
|> 
|> #!/bin/ash
|> 
|> _quote_for_sed()
|> {
|>     cat<<_ACEOF | sed -e 's,[\&,],\\&,g'
|> $1
|> _ACEOF
|> }

Useless Use of Cat.

_quote_for_sed()
{
    sed -e 's/[\&,]/\\&/g' <<_ACEOF 
$1
_ACEOF
}

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

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