Ghostscript——保持交互模式

Ghostscript——保持交互模式

当我将 postscript 数据导入gs程序时,gs程序会解释数据然后立即退出。这与手册页相符:

   -      This is not really a switch, but indicates to  Ghostscript  that
          standard  input is coming from a file or a pipe and not interac-
          tively from the command line.  Ghostscript reads  from  standard
          input  until it reaches end-of-file, executing it like any other
          file, and then continues with processing the command line.  When
          the  command line has been entirely processed, Ghostscript exits
          rather than going into its interactive mode.

有没有办法gs在作为管道运行时强制进入交互模式?我知道我可以将数据转储到临时文件中,运行gs tempfile然后删除临时文件,但我希望一步完成所有操作。

答案1

使用 gs <( program_writing_ps_to_sdout )

相关内容