--- Lasse Edlund <[EMAIL PROTECTED]> 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 - - > 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 > "[EMAIL PROTECTED]" > diff foo bar is the the way a contruct like (cat foo; cat bar| diff - -) may work but I doubt it because they both are writing to the same STDOUT and so "- -" is more then likely invalid. (echo "random junkola" > foo) && (cat foo > bar) or (echo "random junkola" > foo) && (cp foo bar) would be just as good. would echo the same thing to two files. I think what you want might be diff `cat foo` `cat bar` which is the the quote on the tilde key. check man eval if I'm using the right quote this will evaluate the command in the ` ` and pass its STDOUT as a parameter. For large files this might fail because of the limitation to the command line length, I'm not certain. the best thing might be look in /etc/rc for the last line which will be something like: echo `date` those are the quotes you want and this is the only way to do what I think you're asking. -brian _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"