> 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!
You don't. Recall that | is the "pipe" operator, and like in real life, there's one input and one output. Pipes used on the command line are for all intents and purposes "unnamed", and you can only build up one "pipeline". That's why named pipes were invented, so that you could have multiple pipes and refer to them by name (instead of implicitly). But in your case, using named pipes is really no different than using files. -- Matt Emmerton _______________________________________________ firstname.lastname@example.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"