Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > fr.comp.os.unix > #8127
| From | Jo Engo <yl@icite.fr> |
|---|---|
| Newsgroups | fr.comp.os.unix |
| Subject | Re: [bash] select |
| Date | 2023-12-14 15:21 +0000 |
| Organization | <http://pasdenom.info/news.html> |
| Message-ID | <ulf6gu$r3t$1@rasp.pasdenom.info> (permalink) |
| References | <ul1sek$d5$2@rasp.pasdenom.info> <ul2ld2$d5$4@rasp.pasdenom.info> <ul4qc3$d5$8@rasp.pasdenom.info> <slrnunelhu.269.naddy@lorvorc.mips.inka.de> |
Le Mon, 11 Dec 2023 18:34:38 -0000 (UTC), Christian Weisgerber a écrit :
>> Dans bash:
>> IFS=$'\n'
Pas le choix, je vais être obligé de venir à ça car :
> mapfile -t tableau <$filee
> select item in "${tableau[@]}"
ne marche pas : j'ai un mot par item et non la phrase souhaitée (qui se
trouvait dns la ligne. Soyons précis je fais exactement :
«
mapfile -t tableau < liste-sauvegarde
select item in ${tableau[@]}
»
avec liste-sauvegarde qui contient eg.
des trucs bizarres
un truc très important
quelques
deux de plus
l'autre
et alors quand je lance mon script select donne :
1) des 3) bizarres 5) truc 7) important 9) deux
11) plus
2) trucs 4) un 6) très 8) quelques 10) de
12) l'autre
Alors que j'attendais :
1) des trucs bizarres 3 quelques
2) un truc très important 4 deux de plus
5) l'autre
--
attend je suis pas un r3b3lz moi
juste un type ss cervo
-+- underfog in GPJ: C'est lamer qui prends l'homme -+-
Back to fr.comp.os.unix | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[bash] select Jo Engo <yl@icite.fr> - 2023-12-09 14:09 +0000
Re: [bash] select Jo Engo <yl@icite.fr> - 2023-12-09 21:15 +0000
Re: [bash] select Jo Engo <yl@icite.fr> - 2023-12-09 21:59 +0000
Re: [bash] select Jo Engo <yl@icite.fr> - 2023-12-10 16:52 +0000
Re: [bash] select Christian Weisgerber <naddy@mips.inka.de> - 2023-12-11 18:34 +0000
Re: [bash] select Jo Engo <yl@icite.fr> - 2023-12-13 14:38 +0000
Re: [bash] select Christian Weisgerber <naddy@mips.inka.de> - 2023-12-13 23:00 +0000
Re: [bash] select Jo Engo <yl@icite.fr> - 2023-12-14 15:21 +0000
Re: [bash] select Jo Engo <yl@icite.fr> - 2023-12-14 15:43 +0000
Re: [bash] select Christophe PEREZ <chris@novazur.fr> - 2023-12-14 18:51 +0000
Re: [bash] select Christian Weisgerber <naddy@mips.inka.de> - 2023-12-14 18:38 +0000
Re: [bash] select Christian Weisgerber <naddy@mips.inka.de> - 2023-12-11 18:32 +0000
csiph-web