The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 03-10-2009
bhag281 bhag281 is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 6
[: =: unary operator expected

HI radulov,
I've run the script with trace option. and the output is attached below.
and one more thing, the browser is going to safe mode disabling all the efects before it shows the unary operator error.


Code:
+ bash -xv launchpad.sh
#!/bin/sh
# Licensed Materials - Property of IBM
# 5648-F10 (C) Copyright International Business Machines Corp. 2005
# All Rights Reserved
# US Government Users Restricted Rights - Use, duplication or disclosure
# restricted by GSA ADP Schedule Contract with IBM Corp.
    supportedMozillaVersion() {
        case "$*" in
            "rv":1.[7-9]*) return 0;;
            *"rv":[2-9].[0-9]*) return 0;;
            *"rv":*) return 1;;
            Mozilla\ 1.[7-9]*) return 0;;
            Mozilla\ [2-9].[0-9]*) return 0;;
            "*") return 1;;
        esac
    }

    supportedFirefoxVersion() {
        case "$*" in
            *Firefox\ [1-9].*) return 0;;
            *Firefox/[1-9].*) return 0;;
            *Firefox*) return 1;;
            *rv:1.[7-9]*) return 0;;
            *rv:[2-9].*) return 0;;
            *rv:*) return 1;;
            Mozilla*\ 1.[7-9]*) return 0;;
            Mozilla*\ [2-9].[0-9]*) return 0;;
            *) return 1;;
        esac
    }

    whichBrowser=NoBrowser
+ whichBrowser=NoBrowser
    case "$0" in
        /*) fullpath=$0;;
         *) fullpath=`pwd`/$0;;
    esac
+ case "$0" in
pwd
++ pwd
+ fullpath=/nfs/opt/launchpad.sh
    installsourcepath=`echo "$fullpath" | sed "s,/\./,/,g; s,/[^/][^/]*/\.\./,/,g; s,//,/,g; s,/[^/]*$,,"`
echo "$fullpath" | sed "s,/\./,/,g; s,/[^/][^/]*/\.\./,/,g; s,//,/,g; s,/[^/]*$,,"
++ echo /nfs/opt/launchpad.sh
++ sed 's,/\./,/,g; s,/[^/][^/]*/\.\./,/,g; s,//,/,g; s,/[^/]*$,,'
+ installsourcepath=/nfs/opt
    if [ "$BROWSER" ]; then
        if versionString=`($BROWSER -version) 2>/dev/null`; then
            case "$versionString" in
            *Firefox*) if supportedFirefoxVersion "$versionString"; then
                           whichBrowser=Firefox
                       fi ;;
            *Mozilla*) if supportedMozillaVersion "$versionString"; then
                           whichBrowser=Mozilla
                       fi ;;
            esac
        fi
    fi
+ '[' /usr/bin/mozilla ']'
($BROWSER -version) 2>/dev/null
+ versionString=
    if [ $whichBrowser = NoBrowser ]; then
        PATH="$PATH:/usr/X11R6/bin:/usr/local/bin:/usr/bin:/opt/mozilla:/usr/mozilla:/usr/mozilla/sfw/lib/mozilla"
        if versionString=`(mozilla -version) 2>/dev/null`; then
            BROWSER=mozilla; export BROWSER
            if supportedMozillaVersion "$versionString"; then
                whichBrowser=Mozilla
            fi
        fi
    fi
+ '[' NoBrowser = NoBrowser ']'
+ PATH=/sbin:/usr/sbin:/usr/local/sbin:/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/bin:/opt/mozilla:/usr/mozilla:/usr/mozilla/sfw/lib/mozilla
(mozilla -version) 2>/dev/null
+ versionString=
    if [ $whichBrowser = NoBrowser ]; then
        PATH="$PATH:/opt/firefox:/usr/firefox:/usr/firefox/sfw/lib/firefox"
        if versionString=`(firefox -version) 2>/dev/null`; then
            BROWSER=firefox; export BROWSER
            if supportedFirefoxVersion "$versionString"; then
                whichBrowser=Firefox
            fi
        fi
    fi
+ '[' NoBrowser = NoBrowser ']'
+ PATH=/sbin:/usr/sbin:/usr/local/sbin:/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/bin:/opt/mozilla:/usr/mozilla:/usr/mozilla/sfw/lib/mozilla:/opt/firefox:/usr/firefox:/usr/firefox/sfw/lib/firefox
(firefox -version) 2>/dev/null
+ versionString='Mozilla Firefox 2.0.0.2, Copyright (c) 1998 - 2007 mozilla.org'
+ BROWSER=firefox
+ export BROWSER
+ supportedFirefoxVersion 'Mozilla Firefox 2.0.0.2, Copyright (c) 1998 - 2007 mozilla.org'
+ case "$*" in
+ return 0
+ whichBrowser=Firefox

    LaunchPadArch=`$installsourcepath/launchpad/SetArchitecture.sh`
$installsourcepath/launchpad/SetArchitecture.sh
++ /nfs/opt/launchpad/SetArchitecture.sh
+ LaunchPadArch=s390x
    export LaunchPadArch
+ export LaunchPadArch

    eval $* exec $installsourcepath/launchpad/$whichBrowser.sh
+ eval exec /nfs/opt/launchpad/Firefox.sh
exec /nfs/opt/launchpad/Firefox.sh
++ exec /nfs/opt/launchpad/Firefox.sh
+ firefox -nosplash -safe-mode -P Profile_30206 -profile /tmp/IBM_LaunchPad_30206/Profile_30206 file:///nfs/opt/launchpad/Mozilla.html

/bin/sh: line 10: [: =: unary operator expected

Last edited by radoulov; 03-10-2009 at 08:56 AM.. Reason: added code tags