in reply to How to use print and pipe it to awk ?

Welcome to the Monastery.

Please use "code" tags around your code (see Writeup Formatting Tips) as this will make it easier for you to communicate your problem.

Yes, you should be able to use the system command with awk, but you might be better off if you just use Perl's builtin printf function instead. And, instead of using system to append to a file, you could use Perl's open function to append to a file.

  • Comment on Re: How to use print and pipe it to awk ?

Replies are listed 'Best First'.
Re^2: How to use print and pipe it to awk ?
by Fletch (Bishop) on Jan 24, 2008 at 15:07 UTC

    However he wouldn't be able to use system to open an external process to which he could pipe output since it doesn't work that way; for that he'd need to instead open a pipe to it.

    (But that's still not really a great idea in this particular case as everyone's been saying . . .)

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.