bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bash vs sh / ticks appearing


From: Tuc at T-B-O-H.NET
Subject: bash vs sh / ticks appearing
Date: Sat, 29 Dec 2007 08:22:45 -0500 (EST)

Hi,

        I normally run a program on FreeBSD using its sh, and 
it runs fine.

        When I brought it over to Linux using bash its doing
some strange stuff...

SCRIPT:

#!/bin/sh -x

SCRIPT=$1
shift
EMAIL=$1

echo $SCRIPT
$SCRIPT 1>/tmp/mailifoutput.$$ 2>&1




sh/FreeBSD output:

# ./script.sh "/usr/local/bin/otherprogram \"Param 1\" \"Param2\"" email
+ SCRIPT=/usr/local/bin/otherprogram "Param 1" "Param2"
+ shift
+ EMAIL=email
+ echo /usr/local/bin/otherprogram "Param 1" "Param2"
/usr/local/bin/otherprogram "Param 1" "Param2"
+ /usr/local/bin/otherprogram "Param 1" "Param2"

bash 3.00.15(1)-release/Centos Linux 2.6.9-42.0.10.EL
[root@sonar tmp]# ./script.sh "/usr/local/bin/otherprogram \"Param 1\" 
\"Param2\"" email
+ SCRIPT='/usr/local/bin/otherprogram "Param 1" "Param2"'
+ shift
+ EMAIL=email
+ echo /usr/local/bin/otherprogram '"Param' '1"' '"Param2"'
/usr/local/bin/otherprogram "Param 1" "Param2"
+ /usr/local/bin/otherprogram '"Param' '1"' '"Param2"'


        Why does it insert the ticks, which end up making
/usr/local/bin/otherprogram fail? I checked the FAQ for
"tick" and didn't see anything.

                Thanks, Tuc




reply via email to

[Prev in Thread] Current Thread [Next in Thread]