[PATCH setup 0/3] Setup replacement for incver_ifdep

Eric Blake eblake@redhat.com
Thu Jan 28 20:22:00 GMT 2016


On 01/28/2016 01:17 PM, Ken Brown wrote:
>>>    install-info $f /usr/share/info/dir ||
>>>    install-info --entry="* $$f ($f): $$f" $$f /usr/share/info/dir
>>>
>>> First, what do those double dollar signs mean?
>>
>> If this is from a Makefile snippet, it says that $f is a make variable,
>> while $$ turns into a literal $f for the shell that make invokes

> 
> It's not a Makefile snippet; it's a snippet from a bash shell script.  Here's more context:
> 
>   for f in /usr/share/info/*; do
>       case "$f" in
>           *\**)
>               ;;
>           */dir|*/dir.info*)
>               ;;
>           *-[0123456789]*)
>               ;;
>           *)
>               install-info $f /usr/share/info/dir ||
>               install-info --entry="* $$f ($f): $$f" $$f /usr/share/info/dir
>               ;;
>       esac
>   done
> 
> It looks to me like all those double dollar signs will just get expanded to the PID of the bash process, so that the second install-info command is nonsense.  But maybe I'm missing something.

Oooh, scary. Yeah, it looks like utter nonsense, as that would indeed
give the PID of bash followed by a literal f, but who wants to look up
info of '1234f'?  I wonder if someone writing the script copied
incorrectly from a Makefile?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20160128/fde6fe92/attachment.sig>


More information about the Cygwin-apps mailing list