[kwlug-disc] fish vs bash: a progress bar from YSAP and some timing measurements

Ron ron at bclug.ca
Sun Aug 24 00:33:09 EDT 2025


William Park via kwlug-disc wrote on 2025-08-23 20:58:

> For comparison, it would go like this in Bash...
> 
> echo " $i/$#: \$$i: ${!i} (or \$arg: $arg)"
I've never used the ${!i} syntax in bash, although I've seen it.


What does that do?


Searching for it in `man bash` is not fun.

/\{\! <-- what one types to get results, "boo"


That returns a bunch of results, but they're inscrutable.

(I'm so tired of fighting with bash's syntax.)


It appears it's always used with arrays like thus:

${name@} or ${name*}

Then, there's this, which I think applies here?

${!prefix*}
${!prefix@}
   Names matching prefix.  Expands to the names  of  variables  whose
   names  begin  with prefix, separated by the first character of the
   IFS special variable.  When @ is used and  the  expansion  appears
   within  double  quotes,  each  variable name expands to a separate
   word.


I actually don't understand what this is telling me.


More information about the kwlug-disc mailing list