On Mon, Jan 17, 2005 at 11:13:11AM +0100, Stepan Kasal wrote:
> On Fri, Jan 14, 2005 at 02:56:16AM -0800, Noah Misch wrote:
> > s/[^t]$/&\\/ does not do the job?
>
> I don't think so. What if the substituted value were "first\nsecond"?
> The newline wouldn't get escaped.
Oops. I stopped thinking far too quickly. Thanks.
> I think that if we choose a sufficiently unusual delimiter, we can go with
> it. I suggest that we use the delimiter "@!_!#_ \n" (the last two characters
> are space and newline).
That is much better.
If you wanted to avoid excluding any delimiter, you do something like this:
for ac_var in var1 var2 ... varN
do
eval "case \$$ac_var in
*'
'*) filter=' | sed '\\''\$q;s/\$/\\\\/'\\' ;;
*) filter= ;;
esac"
eval echo \"s,@$ac_var@,\$$ac_var,\;t t\" $filter
done | existing_cleanup_seds
_______________________________________________
Autoconf mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/autoconf