Link to home
Start Free TrialLog in
Avatar of Jason Yu
Jason YuFlag for United States of America

asked on

what does this code mean

I have the following code running as a crontab on a jboss server, could anyone explain each line, thanks.

#!/bin/bash

for i in {1..20}
do
        #curl $(curl -k -i -m 10 https://xxx.xxx.com/jboss-status -k -i 2> /dev/null | grep "Location:" |sed 's/Location: //') > /var/www/html/f5-status 2> /dev/null
        curl -kLm 10 https://localhost/jboss-status > /var/www/html/f5-status 2> /dev/null
        sleep 15
done

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The first line means that the script is being executed by the /bin/bash shell. Minor note on the output, it is overwritten each time because of the single > If you would retain output of each check add another Iike this :

... >> /var/www ...