Ghostscript - 保持互动模式


2

当我将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然后删除临时文件,但我更愿意一步到位。

Answers:


3

使用gs <(program_writing_ps_to_sdout)


3
你能详细说明这是如何运作的吗?
music2myear 2016年

@ music2myear - <()构造意味着“在括号中运行命令......然后主命令应假装输出来自文件。”
hymie 2016年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.