How do I give 2 parameters to programs in an unix enviroment?

[ Available lists | Index of freebsd-questions | Month of Sep 2006 | Week of 8 Sep 2006 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Lasse Edlund <lassee@kth.se>
Date
8 Sep 2006 13:10:27
Subject
How do I give 2 parameters to programs in an unix enviroment?
Message-ID
45016BBC.8080803@kth.se


[ Hide this part ]
If I have two files "foo" and "bar" and try to run diff on them I write:
$diff foo bar
I can also write
$cat foo | diff - bar
But how do I give a program two (2) commands? not only to diff
but to any program that wants double input...
I wanna do
$cat foo | cat bar | diff - -
especially with echo commands that would be handy so I dont have to
create files!


Elapsed time: 0.170 seconds