Re: sed: nach "../.." suchen
On Fre, 30 Mai 2003 at 00:22 (+0200), Jan Schulz wrote:
> Hallo,
>
> Wie bekomme ich sed dazu, aus
>
> classpath=/../../../../../usr/share/[file];/../../../../../usr/share/[file];[..]
> classpath=/usr/share/[file];/usr/share/[file];[..]
>
> zu machen?
[viel zu umständliche Versuche]
sed 's#\.\./##g'
> Und falls jemand gerade dabei ist: wie bekomme ich es hin, das alle
> /../../../../../usr/share/eclipse/plugins/<subdir>/bin; auch
> rausfallen?
sed 's#/usr/share/eclipse/plugins/[^/]\+/bin##g'
oder beides kombiniert:
sed 's#\.\./##g;s#/usr/share/eclipse/plugins/[^/]\+/bin;##g'
Jan
Reply to: