Loading ...
Sorry, an error occurred while loading the content.

553Re: [NTS] Redirecting GAWK Output

Expand Messages
  • Robert Bull
    May 13, 2012
    • 0 Attachment
      Hello, flo.gehrke;

      Sunday, May 13, 2012, 12:47:23 PM, you wrote:

      fg> The only drawback is that we still have to create an output file.
      fg> Is there no way to redirect the output from GAWK to the clipboard,
      fg> for example, without saving it to the disk?

      As I understand it, default AWK behaviour is to expect input from
      standard input, i.e. keyboard, and output to standard output, i.e.
      screen. Both can be redirected. I don't know a way to redirect STDOUT
      to the clipboard, which sounds like it should be the function of an
      obscure utility program. However,if you *were* willing to print to a
      file, you could send the contents of the file to the clipboard with a
      utility program, of which several exist. Recent versions of Windows -
      well, the Vista Home Premium I'm using, at least - ship with a
      Microsoft tool called CLIP.EXE to do this. I normally use Horst
      Schaeffer's freeware CLIPTEXT,
      http://www.horstmuc.de/wbat32.htm#cliptext because it can transfer
      between a file and the clipboard in *both* directions.

      Then you'd do something like

      gawk.exe -f script.awk foo.bar > c:\temp\gawkout.txt
      cliptext from c:\temp\gawkout.txt

      but that's getting more like a batch file, and maybe complicating the clip.

      --
      Regards,

      Robert Bull
      mailto:barlennan@...
    • Show all 16 messages in this topic