gtkdialog again, the other way around this time – how to use bash variables in dialog?

Nils Kassube kassube at
Sun Apr 21 13:59:52 UTC 2013

Johnny Rosenberg wrote:
> 2013/4/21 Nils Kassube <kassube at>:
> > MainDialog=$(<${DialogFolder}/musician-dialogue.xml)
> > MainDialog="${MainDialog/\$InstrumentsList/$InstrumentsList}"
> > MainDialog="${MainDialog/\$MusiciansList/$MusiciansList}"
> > export MainDialog

> I was actually thinking something almost similar, using sed instead,
> but this looks more elegant, and I have seen that people seems to say
> that it's better to use the shell built-in stuff rather than to invoke
> external programs or commands.

Well, you wrote somewhere that you are using bash - therefore this 
solution works. But IIRC a traditional shell doesn't know string 
replacement. Therefore the sed option would be necessary if you want to 
make the script portable.


More information about the ubuntu-users mailing list