String in der Bash zerlegen
Jan-Benedict Glaw
jbglaw at lug-owl.de
Thu Aug 6 14:17:46 CEST 2009
On Thu, 2009-08-06 12:59:42 +0200, Marco Wiese <mwiese at beit.de> wrote:
> Nun brauche ich davon aber immer nur den String nach dem letzten "/". Die
> Länge ist allerdings variabel, so dass ich nciht weiß, wieviel Slashes
> enthalten sind. Weiß jemand Rat, wie ich an den letzten Schtring komme???
jbglaw at bixie:~$ echo 1/2/3/444 | sed -e 's#^.*/\([^/]\+\)$#\1#'
444
MfG, JBG
--
Jan-Benedict Glaw jbglaw at lug-owl.de +49-172-7608481
Signature of: Wenn ich wach bin, träume ich.
the second :
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lug-owl.de/pipermail/linux/attachments/20090806/df764e22/attachment.sig>
More information about the Linux
mailing list