> Sent: Thursday, July 29, 2021 at 1:06 AM
> From: "Greg Wooledge" <greg@wooledge.org>
> To: help-bash@gnu.org
> Subject: Re: Quoting
>
> On Wed, Jul 28, 2021 at 01:29:45PM +0200, eduardo-chibas@caramail.com wrote:
> > Is is adequate using the following
> >
> > : ${fdir:=${@:$#}}
> >
> > Or is the following better
> >
> > : ${fdir:="${@:$#}"}
>
> Are you simply trying to put the *last* argument into a variable?
Yes
> [[ $fdir ]] || fdir=${!#}
I have read long winded discussions on the security implications of not quoting
variables. Discussions are quite complicated.
https://unix.stackexchange.com/questions/171346/security-implications-of-forgetting-to-quote-a-variable-in-bash-posix-shells