What does this do in bash: [@]?

Tom Mitchell niftyubuntu at niftyegg.com
Fri Jul 29 18:56:55 UTC 2022


On Fri, Jul 29, 2022 at 11:44 AM Little Girl <littlergirl at gmail.com> wrote:
>
> Hey there,
>
> Bo Berglund wrote:
> >Little Girl wrote:
>
> >>https://unix.stackexchange.com/questions/135010/what-is-the-difference-between-and-when-referencing-bash-array-values
>
> >So do I get it right?:
>
> >- Something gets stuffed into a bash variable like URL in the example
> >- When this variable is later used as the argument to curl then
> >using [@] as shown makes the arguments in $URL load separately into
> >curl as a list of different arguments

Review IFS Internal Field Separator
The bash script is launching curl.   Curl has to parse the arguments
handed to it.
Look at all the curl flags and options and the options flags that
might be altered
by bash.  Bash meta characters... are common in URI strings.
This old joke makes the point.
% csh
% why rub two sticks together ?

why: No match.




More information about the ubuntu-users mailing list