Gentoo Archives: gentoo-server

From: Chris Smart <taskara@××××××××××××.net>
To: gentoo-server@l.g.o
Subject: Re: [gentoo-server] menu items in dialog with variables
Date: Mon, 24 Oct 2005 22:50:24
Message-Id: 435D6435.2060600@internode.on.net
In Reply to: Re: [gentoo-server] menu items in dialog with variables by Wolf Giesen
1 Wolf Giesen wrote:
2
3 > dialog --menu "MENU" 20 50 16 "$menu"
4 >
5 >should work. Does here :)
6 >
7 >Mind the "$menu".
8 >
9 >
10 Thanks for your reply Wolf,
11
12 The script:
13 #!/bin/bash
14 menu="1 first one 2 second one"
15 dialog --menu "MENU" 20 50 16 "$menu"
16
17 Gives me:
18 Error: Expected at least 6 tokens for --menu, have 5.
19
20 Normally I would do something like:
21 menu="1 \"first one\" 2 \"second one\""
22
23 but this is no go with dialog and bash, it adds whatever I put as part of the text.
24
25 Would you mind sending through a working sample? Perhaps I'm doing something wrong!
26
27 Cheers,
28 -c
29
30 --
31 gentoo-server@g.o mailing list

Replies

Subject Author
Re: [gentoo-server] menu items in dialog with variables "Chris T. Purcell" <c_purcell@×××××××××.net>
Re: [gentoo-server] menu items in dialog with variables Wolf Giesen <wolf.giesen@×××××××××××.de>