Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Sep 2006 11:38:22 -0500
From:      "hackmiester (Hunter Fuller)" <hackmiester@hackmiester.com>
To:        lassee@kth.se
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How do I give 2 parameters to programs in an unix enviroment?
Message-ID:  <618126D6-E8CC-4603-8371-C469A2DD96AA@hackmiester.com>
In-Reply-To: <45016BBC.8080803@kth.se>
References:  <45016BBC.8080803@kth.se>

next in thread | previous in thread | raw e-mail | index | archive | help

On 8 September 2006, at 08:10, Lasse Edlund wrote:

> 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 - -

The entire purpose of cat is to concatenate files (make them output  
one after another). So, do:

cat foo bar | diff - -

> especially with echo commands that would be handy so I dont have to
> create files!
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions- 
> unsubscribe@freebsd.org"
>

-- 
hackmiester (Hunter Fuller)

<svinx> yknow when you go to a party, and everyones hooked up except  
one guy and one girl
<svinx> and so they look at each other like.. do we have to?
<svinx> intel & nvidia must be lookin at each other like that right now


Phone
Voice: +1 251 589 6348
Fax: Call the voice number and ask.

Email
General chat: hackmiester@hackmiester.com
Large attachments: hackmiester@gmail.com
SPS-related stuff: hfuller@stpaulsmobile.net

IM
AIM: hackmiester1337
Skype: hackmiester31337
YIM: hackm1ester
Gtalk: hackmiester
MSN: hackmiester@hackmiester.com
Xfire: hackmiester





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?618126D6-E8CC-4603-8371-C469A2DD96AA>