Bash script

Dear experts,

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

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

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

K rgs
DigitBoyAsked:
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.
0
 
DigitBoyAuthor Commented:
hi,

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

Krgs
0
 
DigitBoyAuthor Commented:
nice explaination
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
They are the parameters you provide when calling the script, like this:

CheckOWA.sh somesite.com 12345

CheckOWA.sh is the name of your script

somesite.com is the first parameter - $1

12345 is the second parameter - $2
0
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.