hi monks i want to pass a file name generated by a shell script to another one ... the shell script program i want to pipe my filename into ..looks like this
And why do you want to use Perl to do so? In shell (well, at least in bash - which I'm familiar with) you just use stuff like script2 $(script1). (You can also use backticks, but I just don't like them, and $() has the advantage of allowing nesting.)
while (my $var = <STDIN>) awk -f work_5messages.awk $var
This is neither Perl nor shell, although it slightly resembles both. In Perl this could be
while (my $var = <STDIN>) { chomp $var; system 'awk', -f => 'work_5messages.awk', $var and die "D'Oh! (Do better error checking!!)"; }
and in (ba)sh,
while read var; do awk -f work_5messages.awk "$var"; done
OTOH...
syntax error near unexpected token `)' `while (my $var = <STDIN>) '
This looks like a shell error. You should clarify what you're really after, to help us to help you.
In reply to Re: shell prob
by blazar
in thread shell prob
by vineet2004
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |