Bash script

Posted on 2012-09-03
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
    LVL 37

    Accepted Solution

    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


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


    Author Closing Comment

    nice explaination
    LVL 37

    Expert Comment

    by:Gerwin Jansen
    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

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
    How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
    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…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now