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

2006-09-11 Thread hackmiester (Hunter Fuller)
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

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

2006-09-11 Thread Jan Grant
On Mon, 11 Sep 2006, hackmiester (Hunter Fuller) wrote: 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

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

2006-09-08 Thread Lasse Edlund
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

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

2006-09-08 Thread Matt Emmerton
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

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

2006-09-08 Thread backyard
--- 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

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

2006-09-08 Thread David King
Here's an example using zsh (I assume it's the same using bash, but different using tcsh or sh): diff (find /usr/local -type f | sort) (for each in /var/db/pkg/*/ +CONTENTS; do grep -v '^@' $each; done | sort) This does a diff(1) of what /var/db/pkg says that /usr/local should look like,

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

2006-09-08 Thread Dan Nelson
In the last episode (Sep 08), David King said: Here's an example using zsh (I assume it's the same using bash, but different using tcsh or sh): diff (find /usr/local -type f | sort) (for each in /var/db/pkg/*/ +CONTENTS; do grep -v '^@' $each; done | sort) This does a diff(1) of what

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

2006-09-08 Thread David King
Here's an example using zsh (I assume it's the same using bash, but different using tcsh or sh): [...] This uses the () operator. [...] There's another, similar operator that does force it to use temp files, but I can never remember what it is :) [...] Just for the archives, The =() operator