Article View: es.comp.os.linux.programacion
Article #1997Re: [Bash] Usar read en script con pipe
From: sio2
Date: Sat, 28 May 2005 18:52
Date: Sat, 28 May 2005 18:52
33 lines
1802 bytes
1802 bytes
El s�bado, 28 de mayo de 2005, a las 18:27 GMT, sio2 escribi�:
> Estoy haciendo un script que me gustar�a que pudiese recibir informaci�n
> a trav�s de redirecciones (pipe o <):
> [...]
> Un ejemplo de lo que digo podr�a ser lo siguiente:
>
> #v+
> #!/bin/sh
>
> cat > /dev/null
>
> read var
> #v-
> [...]
Lo he conseguido arreglar haciendo lo siguiente:
#v+
read var < /dev/tty
#v-
No s� c�mo de buena ser� la soluci�n, pero me vale...
--
-- Hoy he re�ido a un hostelero.
-- �Por qu�? �Cu�ndo? �D�nde? �C�mo?
-- Porque cuando donde como
sirven mal, me desespero
--- Tom�s de Iriarte ---
Si Di�xido de Silicio | Debian GNU/Linux
/ \ (SiO2) | Jos� Miguel S�nchez Al�s
O O Mineral de Cuarzo | sio2.ARROB@online.fr | URL #257033
Technical Details
Message-ID:
<slrnd9hfg3.9r6.sio2.ARROB@cebolleta.net.dhis.org>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!proxad.net!infeed-1.proxad.net!news13-e.free.fr!not-for-mailReferences:
<slrnd9he13.9bk.sio2.ARROB@cebolleta.net.dhis.org>Show Full Headers
Complete Article Headers
X-Google-Thread: f86c8,b7619af779d80628 X-Google-Attributes: gidf86c8,public X-Google-Language: SPANISH,ASCII Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!proxad.net!infeed-1.proxad.net!news13-e.free.fr!not-for-mail Newsgroups: es.comp.os.linux.programacion From: sio2 <sio2.ARROB@online.fr> Subject: Re: [Bash] Usar read en script con pipe References: <slrnd9he13.9bk.sio2.ARROB@cebolleta.net.dhis.org> Reply-To: sio2.ARROB@online.fr Message-ID: <slrnd9hfg3.9r6.sio2.ARROB@cebolleta.net.dhis.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit User-Agent: slrn/0.9.8.1 (Debian) Date: Sat, 28 May 2005 20:52:51 +0200 Lines: 33 Organization: Guest of ProXad - France NNTP-Posting-Date: 28 May 2005 21:08:05 MEST NNTP-Posting-Host: 83.49.73.119 X-Trace: 1117307285 news13-e.free.fr 26424 83.49.73.119:10241 X-Complaints-To: abuse@proxad.net