[Gllug] Bourne shell programming

Pete Ryland pdr at pdr.cx
Sun Nov 19 11:34:55 UTC 2006


On 19/11/06, Progga <progga at bengalinux.org> wrote:
> On Sun, Nov 19, 2006 at 03:24:07AM +0000, Mike Brodbelt wrote:
>
> > How can I replace stdin with the output of my previous command? I need
> > to be able to read from the pipeline....
>
> grep root /etc/passwd | awk -F: '{print $1,$2,$3}' > tmp.txt

BTW, what's wrong with the 'cut' command?

Pete
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list