[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [bash] - Catturare STDIN



n.b.

quota meglio! ;)
http://erlug.linux.it/~tann/quote.txt


Il giorno lun, 20/02/2006 alle 17.31 +0100, Andrea Ganduglia ha scritto:
>         
> 
> Il tuo esempio mi ha dato la giusta ispirazione
> 
> #!/bin/bash
> read INPUT
> echo $INPUT
> 
> ~$ echo CIAO | script
> CIAO
> 
> Aspetto conferme... 

ok pero' cosi' ti perdi l'eventuale argomento passato...

infatti,seguendo il tuo esempio, se scrivi

./script CIAO

quello rimane li' ad aspettare un input da STDIN.

Se pero' lo devi *solo* utilizzare in pipe allora ok.

Ciao
Filo

-- 
Filippo Biondi
[Ubuntu|Debian] GNU User
Linux Registered User #357105
Proud member of 
.:ERLUG:. 
no1984.org member - Stop TCG!



Reply to: