bug-bash
[Top][All Lists]
Advanced

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

${//}: say how to non-destructively prefix/suffix


From: Dan Jacobson
Subject: ${//}: say how to non-destructively prefix/suffix
Date: Mon, 06 Nov 2006 02:54:25 +0800

Regarding the
       ${parameter/pattern/string}
       ${parameter//pattern/string}
discussion on the man page:
You don't mention what if pattern is null.
Seems that will never match.
Anyway, no way to
$ set aa bb cc
$ echo address@hidden
so that one gets all parameters to have a string appended,
e.g. aa.t bb.t cc.t
One must sacrifice at least one character in "pattern". No way to
destroy less than one character.

One must do
$ ls|sed s/$/.t/|xargs make -n
as there is no pure bash single shortcut to eliminate the pipes.
Brace Expansion not employable here either.




reply via email to

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