Shell command cannot have 2 or more pipes.
Posted
#1
(In Topic #838)
Trainee
In trying to calculate a HMAC for my application, I tried the following:
Code (gambas)
- 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.
Cheers,
ak.
Posted
Trainee
I'm on Ubuntu 20.04 and on this version, the version of Gambas in the repos is v3.14.3.
After upgrading to v3.17.0, I see there's no such limitation. I did however have ugly font issues that was resolved on comment #3 from this really old post.
I'm starting to like Gambas a lot.
Cheers,
ak.
1 guest and 0 members have just viewed this.




