Matthias Fechner <idefix(at)fechner.net> wrote:
> ich habe hier ein Shellscript und ich möchte viele Leerzeichen durch
> ein Leerzeichen ersetzen, wie muss ich das denn schreiben(will das
> jetzt nicht in Perl machen).
Ich vergaß ganz, hinzuzufügen, daß es auch mit sh-builtins
geht, was effizienter ist, sofern es um den Inhalt einer
Variablen geht. Wenn es dagegen um eine ganze Datei geht,
ist »tr« besser.
$ FOO="foo bar"
$ set -- $FOO
$ echo "$*"
foo bar
(Nachteil ist natürlich, daß $*, $1 etc. überschrieben wer-
den.)
Gruß
Olli
-- Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "All that we see or seem is just a dream within a dream" (E. A. Poe) To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org with "unsubscribe de-bsd-questions" in the body of the messageReceived on Fri 06 Dec 2002 - 13:46:37 CET