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: Tue, 25 Oct 2005 07:28:04
Message-Id: 435DDE18.3030104@internode.on.net
In Reply to: Re: [gentoo-server] menu items in dialog with variables by Wolf Giesen
1 Wolf Giesen wrote:
2
3 >Your problem is the blanks here.
4 >
5 >I'm sure there's a "good" way to un-fsck bash here, but I usually don't
6 >care because this part of bash is so ugly and complex (read the doc and
7 >note how many "if"s there are ... special cases and more special cases).
8 >So I'd simply do it like this and be done for:
9 >
10 >
11 >#!/bin/bash
12 >
13 >menu="1 first\ one 2 second\ one"
14 >echo "MENU" 20 50 16 $menu | xargs dialog --menu
15 >
16 >
17 >Note the backslash-blank combination.
18 >
19 >
20 Ahhhhh thank you so much :) problem solved I think!
21 My menu was looking pretty ugly with all those underscores ;)
22
23 The only other way I could think to do it was to export the menu items
24 into a tempary bash script and then grab the result.. and that was yucky.
25
26 Cheers!!
27 Chris
28 --
29 gentoo-server@g.o mailing list

Replies

Subject Author
Re: [gentoo-server] menu items in dialog with variables Chris Smart <taskara@××××××××××××.net>