Article View: es.comp.os.linux.programacion
Article #10238Re: Orden select del Shell-Script?
From: Joan Sanfeliu
Date: Sat, 16 Mar 2002 15:43
Date: Sat, 16 Mar 2002 15:43
27 lines
1402 bytes
1402 bytes
F wrote:
> Alguien me puede esxplicar el formato de la orden select del shell-script
> (kshell o bash).
>
> teoricamente seria
>
> select I in Altas Bajas Modificaciones Salir
> do
> case $I in
> 1) echo altas
> break;;
> 2) echo bajas
> break;;
> 3) exit 0;;
> esac
> done
>
> pero no va
Hola,
Creo que 'select' solo funciona en una shell korn, asi que asegurate que al
principio del fichero haya #!/bin/ksh, si tienes puesto bash, puede que sea
esa la razon por la que no funcine.
Saludos.
-dc.
Technical Details
Message-ID:
<3345780.ZASKD2KPVS@deepcamboya>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!newsfeed.bcn.ttd.net!news.bcn.ttd.net!not-for-mailReferences:
<kyHk8.117485$EH2.417720@telenews.teleline.es>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII-7-bit X-Google-Thread: f86c8,e6768e1c908a2cb8 X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2002-03-16 07:40:56 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!newsfeed.bcn.ttd.net!news.bcn.ttd.net!not-for-mail From: Joan Sanfeliu <jsf@deepcamboya.dhs.org> Newsgroups: es.comp.os.linux.programacion Subject: Re: Orden select del Shell-Script? Date: Sat, 16 Mar 2002 16:43:13 +0100 Organization: Telefonica Transmision de Datos Lines: 27 Message-ID: <3345780.ZASKD2KPVS@deepcamboya> References: <kyHk8.117485$EH2.417720@telenews.teleline.es> NNTP-Posting-Host: 213-96-38-15.uc.nombres.ttd.es Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.6.1