Re: print

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Jeremy C. Reed
Date:  
To: plug-discuss
Subject: Re: print
On Fri, 25 Jun 2004, Michael Havens wrote:

>     xargs reads the standard input and then runs a command by putting the
>     lines read as the new command's command-line arguments.

>
> Isn't that what the pipe would do w/o the xargs command?


No.

xargs makes command-line arguments from the standard output.

Without xargs, the standard output becomes the standard input of the next
command.

See this simple example:

$ echo 1 2 3 | xargs cat
cat: 1: No such file or directory
cat: 2: No such file or directory
cat: 3: No such file or directory

rainier:~/work/invoices$ echo 1 2 3 | cat
1 2 3


Jeremy C. Reed

                 technical support & remote administration
                http://www.pugetsoundtechnology.com/


---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss