In trying to calculate a HMAC for my application, I tried the following:
smsHMAC = Shell "echo -n 'timestamp\nnonce\nPOST\n/v2/sms\napi.smsglobal.com\n443\n\n' | openssl dgst -sha256 -hmac $(head -1 ~/.smsglobal) -binary | base64"But I keep getting an error. However, if I break the command into 2 parts, with each part having a single pipe, it works.
Is there a limitation to the number of pipes the Shell command will accept or am I doing something wrong? I bet there is a better way to do this, but being new to Gambas, I'm still earning.