tags:

views:

29

answers:

3

http://pastebin.com/GvZVS7a7

help please

Edit

Here's the code from the pastebin:

d=`echo \"$1\"`
echo $d

#command run
./command 2

#expected output
"2"
A: 

I don't get it... It works for me:

$ cat -> command
d=`echo \"$1\"`
echo $d
$ chmod +x command
$ ./command 2
"2"
$ 
aioobe
whats your linux distro, i am using suse , doesnt work for me
soField
A: 

Works for me:

ruffian% cat test.sh
#!/bin/bash

d=`echo \"$1\"`
echo $d

ruffian% /bin/bash test.sh 2
"2"
Maciej Kucharz
it's on Mac OSX
Maciej Kucharz
A: 

Your command works for me, but you should use $() instead of ``.

d=$(echo \"$1\")

However, it's not necessary to use echo in the assignment:

d=\"$1\"

However, on output, you probably want to quote your variable to preserve whitespace:

echo "$d"
Dennis Williamson