in reply to Receiving Standard Input/Piped
As long as you're looking at perl code anyway, backticks should be somewhat familiar...
Of course, this is kinda silly - since you can just run "prog.pl file*" to get the same output. But you may want to do something fancy:$ prog.pl `ls file*`
Mind you, you can't embed backquotes in backquotes. Thankfully, you said "Linux" where I read "bash" over "sh" anyway. So we switch to something like this:$ prog.pl `grep KEYWORD file* | cut -f1 -d:`
Remember: Unix isn't just a shell for running perl. :-)$ prog.pl $(grep $(getkeyword.pl foo) file* | cut -f1 -d:)
|
|---|