sas429s has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to pipe my print output to the awk but some how this doesn't seem to be right. Can some one help me to pipe my print command to awk and then redirect that to the file part_no_update.err??
Does the system command work on awk? If so how do i use it? Please advice I am a complete newbie.print "$dir $t_spec $part_no $chg_lvl $int_lock error" | \ system("awk '{printf"%-13s %10s %7s %5s %4s - %5s\n",$1,$2,$3,$4,$5,$6 +}' >> /$view_tag/app_hwt/heavy_duty/part_no_update.err"); print "$dir $t_spec $part_no $chg_lvl $int_lock" | \ system("awk '{printf "%-13s %10s %7s %5s %4s - error, can not update p +art number...\n\n",$1,$2,$3,$4,$5}'");
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to use print and pipe it to awk ?
by apl (Monsignor) on Jan 24, 2008 at 14:39 UTC | |
|
Re: How to use print and pipe it to awk ?
by johngg (Canon) on Jan 24, 2008 at 16:24 UTC | |
by sas429s (Novice) on Jan 24, 2008 at 16:53 UTC | |
|
Re: How to use print and pipe it to awk ?
by toolic (Bishop) on Jan 24, 2008 at 14:40 UTC | |
by Fletch (Bishop) on Jan 24, 2008 at 15:07 UTC | |
|
Re: How to use print and pipe it to awk ?
by Fletch (Bishop) on Jan 24, 2008 at 14:42 UTC | |
|
Re: How to use print and pipe it to awk ?
by cdarke (Prior) on Jan 24, 2008 at 20:31 UTC | |
|
Re: How to use print and pipe it to awk ?
by roboticus (Chancellor) on Jan 25, 2008 at 04:43 UTC |