[Klug-general] Bash scripting help

Karl Lattimer karl at qdh.org.uk
Sat May 2 09:05:33 UTC 2009


On Sat, 2009-05-02 at 09:53 +0100, dan wrote:
> Ok i;ve been toying with this for hours now and it's sending me nuts so 
> here's hoping someone can help
> 
> I have the following chunk of bash code;
> 
>  Pref="--type='tv,radio,podcast,five,itv,ch4' --since=24"
>  zenity --info --text "$Pref"
> 
> 
> This works fine and the call to zenity outputs a text box with; 
> --type='tv,radio,podcast,five,itv,ch4' --since=24; as expected
> 
> However when I then feed $Pref into a function if comes out as; 
> --type="tv,radio,podcast,five,itv,ch4' --since=24; note the double quote 
> before tv instead of a single qoute
> 
> does anyone have any pointers on whats going on and how to fix this?

All I can say is that's just fucking weird!

hmm

so I'd suggest trying two things, try using $PREF out of quotes entirely
and in caps so e.g.

zenity --info --text $PREF

see what happens, report back.. I'm intrigued :/

BR,
 K
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://mailman.lug.org.uk/pipermail/kent/attachments/20090502/7048452e/attachment.pgp 


More information about the Kent mailing list