View Single Post
  #6   (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

j65nko:

Yes, this works when echoing, but not with cdialog:

Code:
[~]% cat test.sh
#!/bin/sh

var="\"I am Label\" \"I am Text\""

cdialog --menu 'Hello World' 10 40 9 ${var}

echo ${var}

[~]% sh test.sh
┌──────────────────────────────────────┐
│ Hello World                          │
│ ┌──────────────────────────────────┐ │
│ │          "I      am              │ │
│ │          Label"  "I              │ │
│ │          am      Text"           │ │
│ └──────────────────────────────────┘ │
├──────────────────────────────────────┤
│       <  OK  >    <Cancel>           │
└──────────────────────────────────────┘

"I am Label" "I am Text"
cdialog weirdness or cdialog weirdness? I suspect sh weirdness ...

@graudeejs Other tools aren't available in this environment and are not an solution in this case. Trust me, if it would be, I would use them.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote