Skip to content

Commit d3e7c7c

Browse files
author
Raileen Del Rosario
committed
small fix to correctly store instance_id
1 parent 01c4945 commit d3e7c7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/Maestro/eg001TriggerWorkflow.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ Status=$(curl -s -w "%{http_code}\n" -i --request POST ${decoded_trigger_url} \
150150
#ds-snippet-end:Maestro1Step5
151151

152152

153-
instance_id=`cat $response | grep instance_id | sed 's/.*\"instance_id\":\"//' | sed 's/\".*//'`
153+
instance_id=$(grep '"instance_id":' $response | sed -n 's/.*"instance_id": "\([^"]*\)".*/\1/p')
154154
# Store the instance_id into the config file
155-
echo $instance_id >config/INSTANCE_ID
155+
echo "${instance_id}" > config/INSTANCE_ID
156156

157157
echo ""
158158
echo "Response:"

0 commit comments

Comments
 (0)