Discussion:
Expanding a variable in a pipe
@lbutlr
2017-02-26 10:58:02 UTC
Permalink
I have the following:

| curl -s -d 'payload={"text":"${URL}"}' https://……

But the command is executed with the exact string ‘${URL}’, I assume because it is inside single quotes.

How do I expand this?
--
Apple broke AppleScripting signatures in Mail.app, so no random signatures.


____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
***@lists.rwth-aachen.de
h
Len Laulainen
2017-02-26 11:02:09 UTC
Permalink
Try replacing your single ' with a double quote, the protect your inside
double quotes with backslashes:
curl -s -d "payload={\"text\":\"${URL}\"}" https://



Len
| curl -s -d 'payload={"text":"${URL}"}' https://


But the command is executed with the exact string ‘${URL}’, I assume because it is inside single quotes.
How do I expand this?
Loading...