View Single Post
  #3   (View Single Post)  
Old 27th September 2011
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

That works only for a single argument, not multiple:

Code:
var='This is label'
ls "${var}" # Works

var='This is label' 'This is text'
ls "${var}" # Oh noes!
What I need to have is something along the lines of:
# cdialog --menu 'Hello World' 10 40 9 'I am Label' 'I am Text' 'Another label' 'More text'

... Where the highlighted text should be ${var} ...

From the commandline this gives me:
Code:
┌──────────────────────────────────────┐
│ Hello World                          │
│ ┌──────────────────────────────────┐ │
│ │     I am Label     I am Text     │ │
│ │     Another label  More text     │ │
│ │                                  │ │
│ └──────────────────────────────────┘ │
├──────────────────────────────────────┤
│       <  OK  >    <Cancel>           │
└──────────────────────────────────────┘
If I wouldn't quote anything, then every word would be a label/text ... :-|

It sounds silly, but putting 'I am Label' 'I am Text' 'Another label' 'More text' inside of ${var} has kept both myself and a coworker busy for quite some time (With no resolution so far)...
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote