reason1000
IS-IT--Management
Hello,
Is there a way to direct standard output of once command to standard input of a command on the command line?
Example:
Two programs:
program1.pl
program2.pl
program1.pl accepts STDIN, which will be a list generated by
program2.pl. I thought I could run something like below to generate the list with program2.pl and direct that to STDIN of program1.pl so it can process the list.
program1.pl < program2.pl | sort -n | uniq
Are the pipes a problem?
I know there are other ways to do this type of thing but I just got stuck on this and I'm wondering if it's even possible to do.
Thanks!
Is there a way to direct standard output of once command to standard input of a command on the command line?
Example:
Two programs:
program1.pl
program2.pl
program1.pl accepts STDIN, which will be a list generated by
program2.pl. I thought I could run something like below to generate the list with program2.pl and direct that to STDIN of program1.pl so it can process the list.
program1.pl < program2.pl | sort -n | uniq
Are the pipes a problem?
I know there are other ways to do this type of thing but I just got stuck on this and I'm wondering if it's even possible to do.
Thanks!