当我将 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 )