I've been bit by that before. #!/bin/bash is my new shell script default shebang line.<br><br>haven't yet been bit by new bash calling old bash stuff yet. I'm sure it'll happen when I have the least time to debug the mess :-)<br>
<br><div class="gmail_quote">On Tue, Mar 16, 2010 at 4:22 PM, Geoffrey <span dir="ltr"><<a href="mailto:lists@serioustechnology.com">lists@serioustechnology.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Lightner, Jeff wrote:<br>
> Are you running the same shell on both?<br>
<br>
</div>Assuming we are running the same, /bin/sh<br>
<div class="im"><br>
><br>
> Some distros use tcsh instead of bash by default. They also link sh to<br>
> it so if you had a shebang of #!/bin/sh it might not be using the shell<br>
> you think it is.<br>
<br>
</div>Interesting, I'll have to check that out, thanks.<br>
<div><div></div><div class="h5"><br>
><br>
> -----Original Message-----<br>
> From: <a href="mailto:ale-bounces@ale.org">ale-bounces@ale.org</a> [mailto:<a href="mailto:ale-bounces@ale.org">ale-bounces@ale.org</a>] On Behalf Of<br>
> Geoffrey<br>
> Sent: Tuesday, March 16, 2010 2:40 PM<br>
> To: ale<br>
> Subject: [ale] ubuntu users<br>
><br>
> We have a script that is running just fine on RHEL 5.4. When we run it<br>
> on ubunutu (with 'set -x') we get the following error:<br>
><br>
> + [ 1 -ne 1 ]<br>
> + dir=all<br>
> + echo Option all is valid...<br>
> Option all is valid...<br>
> + cd /esc<br>
> + [ all == all ]<br>
> [: 1: all: unexpected operator<br>
> + [ -d all ]<br>
> + echo Apparently all is not checked out. Sorry<br>
> Apparently all is not checked out. Sorry<br>
><br>
> Here is the code in question. What is wrong with this?<br>
><br>
> if [ "$dir" == "all" ]<br>
> then<br>
> for dir in $DOCS $PERL $WEB $ITPROJECTS $SERVERLOG $DBCONFIG<br>
> $LOGPRO \<br>
> $SCRIPTS $THIRDPARTY $ONTHEFLY<br>
> do<br>
> if [ -d $dir ]<br>
> then<br>
> echo "Updating $dir..."<br>
> svn update $dir<br>
> else<br>
> echo "Apparently $dir is not checked out. Sorry"<br>
> fi<br>
> done<br>
> else<br>
> .<br>
> .<br>
><br>
<br>
<br>
--<br>
Until later, Geoffrey<br>
<br>
"I predict future happiness for America if they can prevent<br>
the government from wasting the labors of the people under<br>
the pretense of taking care of them."<br>
- Thomas Jefferson<br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>-- <br>James P. Kinney III<br>Actively in pursuit of Life, Liberty and Happiness <br><br>