[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Quoting
From: |
eduardo-chibas |
Subject: |
Quoting |
Date: |
Wed, 28 Jul 2021 15:14:07 +0200 |
> 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
- Quoting, eduardo-chibas, 2021/07/28
- Re: Quoting, Greg Wooledge, 2021/07/28
- Quoting,
eduardo-chibas <=
- Quoting, eduardo-chibas, 2021/07/28