Matthias Schwarzott wrote:
> Well, you want it compact, without loops.
> Here is it:
> 
> set -- /usr/bin/gcc-3*
> Get first entry: CC="$1"
> Get last entry: eval CC="\${$#}"
> 
Nice one, yeah I thought : splitting was posix silly me ;)
I still shy clear of eval for general use and you have to go thru
contortions with sh, so I'll stick with BASH arrays and "syntactic sugar"
which gets twisted enough as it is.


-- 
gentoo-dev@lists.gentoo.org mailing list

Reply via email to