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

Re: [bash] - Catturare STDIN



Andrea Ganduglia wrote:
> [..]
> ma se io volessi instanziare lo script cosi':
> 
> echo ciao | script
> 
> come faccio a catturare lo STDIN di echo e passarlo a script?
> 

Se vuoi appoggiarti ad un file temporaneo:

#!/bin/sh
..
cat > temp_file.$$
..
# Tutte le operazioni che vuoi leggendo dal file temp_file.$$
..
rm temp_file.$$
exit 0


Ciao,
-- 
                                          | .' ' `.
Andrea Berardi aka Syneus                 | : :'  :   Debian User
                                          | `. `'`
                                          |   `-
Linux Registered User #395193             | Debian GNU/Linux
http://counter.li.org/                    | http://www.debian.org



Reply to: