[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (cross post from bug-make) A complete example of quoting an arbitrar
From: |
Kaz Kylheku |
Subject: |
Re: (cross post from bug-make) A complete example of quoting an arbitrary value as a word in a shell script |
Date: |
Sat, 05 Nov 2022 18:59:14 -0700 |
User-agent: |
K-9 Mail for Android |
Just Base64-encode the value as, say, the make variable B64VAL and do
eval "$$(base64dec $(B64VAL))"
in the recipe or in a $(shell ...).
If that isn't palatable, invent some other encoding that is more readable.
URL encoding: percent hex notation for control and special characters.
Quoted printable from MIME is another possibility.
You just have a dependency on the decoding tool.
Or make up something decodable by an awk or sed one liner. Awk has environment
access, and gmake can export.