Re: Several reasons why debian should not use bash for /bin/sh
Roberto Lumbreras <rover@lander.es> wrote:
> I use a lot bash substitutions like this...
> bash-2.01$ blah="psee:jjkkuu"; echo ${blah/*:/}
> jjkkuu
> bash-2.01$
> I don't know how to do that in sh without awk, cut or sed. Ideas? ;-)
Try
blah="psee:jjkkuu"; echo ${blah##*:}
which is POSIX.
--
Debian GNU/Linux 2.0 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: