ls-script

Jonas Schrieb jschrieb at game-sites.de
Mon Nov 4 15:30:02 CET 2002


Am Mon, 2002-11-04 um 15.05 schrieb Florian Schwarz:
> Thomas Schmidt schrieb:
> 
> > find -name '*.mp3' | sed 's/^/z:\\/' > lists/bla.m3u
> 
> Wie bekomme ich jetzt _alle_ / durch ein 
> \ ersetzt? sed 's/\//\\/' ersetzt ja immer nur ein / pro Zeile. 5-6 Mal 
> sed 's/\//\\/' wäre zwar ne Möglichkeit, aber das geht doch bestimmt 
> noch schöner, oder?

sed -e 's/\//\\/g'

Btw: Du kannst zum Trennen der Argumente statt dem / auch ein @
benutzen. Außerdem brauchst du im Argument kein \ vor den / setzen. Ich
finde, dass das viel schöner zu lesen ist, wenn du viele / in dem
Ausdruck benutzt:

sed -e 's@/@\\@g'


Tschö,		Jonas
 
> -- 
> Linux mailing list Linux at lug-owl.de
> subscribe/unsubscribe: http://lug-owl.de/cgi-bin/mailman/listinfo/linux
> Hinweise zur Nutzung: http://www.lug-owl.de/Mailingliste/hints.epo
-- 
-----BEGIN GEEK CODE BLOCK (3.12)-----
GCS d- s: a18 C++ UL++>++++$ P+>+++ E- W++ N o? K- w-(--) O(?) M(?) V?
PS+
PE-(--) Y+ PGP++ t+ 5 X+ R tv-() b(-) DI? D+ G e(*)>++++ h!>(---) r++ y?
-----END GEEK CODE BLOCK--------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://lug-owl.de/pipermail/linux/attachments/20021104/968d5510/attachment.sig>


More information about the Linux mailing list