[Bradford] bash hell , removing " from a strings

Dick Thomas xpd259 at gmail.com
Sun Jun 28 22:34:08 UTC 2009


I'm writing a bash script and i'm stuck

the out put of a dialog menu is

echo $select
"foo" "bar" "lemon" cheese"

while I need
$foo $bar $lemon $cheese

to reuse them as strings later in the script
and very new to bash scripting and i've no idea how to do this
any help would be fantastic

Dick

<code>
dialog --backtitle "Enable / Disable Tags" \
		--no-cancel --title "CHECKLIST BOX" \
	        --checklist "Hi, blah blah fill me in" 25 61 15 \
        	"$CITY"  "$CITY_TAG" off \
         	"$COPYRIGHT"    "$COPYRIGHT_TAG" off \
        	"$Orange" "$orange_tag" off \
        	"$Chicken"    "$chicken_tag" off \
        	"$Cat"    "$CAT_TAG" off\
        	"$Fish"   "$FISH_TAG" off \
        	"$Lemon"  "$LEMON_TAG" on 2> $tempfile2

	retval=$?

	enable=`cat $tempfile2`

echo $enable
</code>
"foo" "bar" "lemon" "poo-sticks"



More information about the Bradford mailing list