[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Displaying output of shell script
From: |
Arun Vimalathithen |
Subject: |
Displaying output of shell script |
Date: |
Tue, 7 Nov 2017 12:13:24 +1100 |
Hi,
I have a shell script(s) (generated) that does something calls a bunch
of curl commands in a loop and accumulates the HTTP response values to
decide the exit value. Something similar to:-
EXEC 3>&1
EXIT_VALUE=0
curl="curl XXXXXXXX"
HTTP_STATUS=$curl | parse and get HTTP status
MESSAGE="The cmd $curl executed with status $HTTP_STATUS"
if [ $HTTP_STATUS -gt 204]
EXIT_VALUE=1
fi
echo $MESSAGE >&3
echo EXIT_VALUE
I need the contents of $MESSAGE to be displayed while the script is
running as well (for the users to troubleshoot, etc) but I have lost
then when I converted the script to be run through GNU parallel.
Can someone please give me any pointers on where I am going wrong?
Thanks,
Arun
- Displaying output of shell script,
Arun Vimalathithen <=