% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 277 100 174 100 103 464 274 --:--:-- --:--:-- --:--:-- 736{"result":{"progressId":"ES_7PBXiq5gg67u9Vr","percentComplete":0.0,"status":"inProg ress"},"meta":{"requestId":"**********************","httpStatus":"200 - OK"}}
I need to extract the highlighted part beginning with ES_
I tried using
curl <...> | sed '"progressId"\:"(ES_[A-Za-z0-9]{15})'
however it still stores the entire output in the environment variable.
sed
command is malformed since it does not contain any command; I'm surprised you didn't get any error message ... – AdminBee May 15 '20 at 07:22sed
solution can be trusted to work reliably. – Kusalananda May 15 '20 at 11:45