> No, ${parameter:offset} and ${parameter:offset:length} are bash specific > not XSI mandated.
But we don't need bash-specific hacks. ${parameter#??} serves as a great XSI alternative to ${parameter:2}, and with a (lot) more thought, ${1:1:1} can be written without forks and without bash-isms as: tmp=${1#?} patt= i=2 while test $i -lt ${#1}; do patt="?$patt" i=$((i+1)) done result=${tmp%$patt} Obviously, you'd want to pick better variable names due to namespace considerations... -- View this message in context: http://old.nabble.com/-PATCH--Add-an-XSI-replacement-for-func_split_short_opt.-tp29005049p29008555.html Sent from the Gnu - Libtool - Patches mailing list archive at Nabble.com.