Bash script

Dear experts,

I've found following code, but doesn't understand. I'm not at all a scripting guy.

LINES=`wget –q –O - --no-check-certificate https://$1:$2/owa`
if [[ $LINES == *utlook* ]]; then
echo "OK"
echo "FAILURE"
exit 0

If someone can provide me more detailled information that would be great.

K rgs
Who is Participating?
Gerwin Jansen, EE MVETopic Advisor Commented:
It's purpose seems to determine whether Outlook webmail is available on a certain server/port  that are provided to the script as first ($1) and second ($2) parameter. The script is getting the main owa (web)page and if that page contains the string between ** - the script assumes OWA is available.
DigitBoyAuthor Commented:

sorry for this suppid question, but what kind of parameters are set for $1 & $2?

DigitBoyAuthor Commented:
nice explaination
Gerwin Jansen, EE MVETopic Advisor Commented:
They are the parameters you provide when calling the script, like this: 12345 is the name of your script is the first parameter - $1

12345 is the second parameter - $2
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.