Bash script

Posted on 2012-09-03
Medium Priority
Last Modified: 2012-09-03
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
Question by:DigitBoy
  • 2
  • 2
LVL 38

Accepted Solution

Gerwin Jansen, EE MVE earned 1000 total points
ID: 38361723
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.

Author Comment

ID: 38361729

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


Author Closing Comment

ID: 38361754
nice explaination
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 38361776
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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses
Course of the Month16 days, 15 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question