Is is adequate using the following : ${fdir:=${@:$#}} Or is the following better : ${fdir:="${@:$#}"}