[ale] ubuntu users

Lightner, Jeff jlightner at water.com
Tue Mar 16 15:39:13 EDT 2010


Are you running the same shell on both?

Some distros use tcsh instead of bash by default.   They also link sh to
it so if you had a shebang of #!/bin/sh it might not be using the shell
you think it is.

-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of
Geoffrey
Sent: Tuesday, March 16, 2010 2:40 PM
To: ale
Subject: [ale] ubuntu users

We have a script that is running just fine on RHEL 5.4.  When we run it 
on ubunutu (with 'set -x') we get the following error:

+ [ 1 -ne 1 ]
+ dir=all
+ echo Option all is valid...
Option all is valid...
+ cd /esc
+ [ all == all ]
[: 1: all: unexpected operator
+ [ -d all ]
+ echo Apparently all is not checked out. Sorry
Apparently all is not checked out. Sorry

Here is the code in question.  What is wrong with this?

if [ "$dir" == "all" ]
then
     for dir in $DOCS $PERL $WEB $ITPROJECTS $SERVERLOG $DBCONFIG
$LOGPRO \
         $SCRIPTS $THIRDPARTY $ONTHEFLY
     do
         if [ -d $dir ]
         then
             echo "Updating $dir..."
             svn update $dir
         else
             echo "Apparently $dir is not checked out. Sorry"
         fi
     done
else
.
.

-- 
Until later, Geoffrey

"I predict future happiness for America if they can prevent
the government from wasting the labors of the people under
the pretense of taking care of them."
- Thomas Jefferson
_______________________________________________
Ale mailing list
Ale at ale.org
http://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
 
Proud partner. Susan G. Komen for the Cure.
 
Please consider our environment before printing this e-mail or attachments.
----------------------------------
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.
----------------------------------



More information about the Ale mailing list