Re: how to write this simple script command?



Keith Keller wrote:


Why generate a temp file at all?

#!/bin/bash
a2ps --output=- $1 | ps2pdf - > $1.pdf

Sadly, you still need $1, since ps2pdf can't figure out the filename if
it's sent stdin.

--keith

Thank you. I just tried yours. It works. I like yours. It is the best.
.



Relevant Pages

  • File naming [was Re: Bug reporting impossible]
    ... what name should it use if you specify stdin? ... Firstly, why does Python? ... Secondly, EVERY string is an invalid filename on some platforms, without ... |>> It is one of the standard conventions, which is why Python ...
    (comp.lang.python)
  • Re: problem in using
    ... ladan writes: ... the first filename that has been read from the 'list2', ... the value of "stdin", which is not in my filenames and any other ... fopen doesn't like a cell array being passed in, ...
    (comp.soft-sys.matlab)
  • Re: bypass shell - pipe into child pid and receive otput
    ... this isn't really a filter program. ... Passing '-' as the filename works as a shell command, ... convention that many programs support a filename of - to mean stdin (or ...
    (comp.lang.perl.misc)
  • Which kind of loop do I use, do or while?
    ... C, so the constructs are those of that language, but the question is ... FILE *fp = stdin; ... assign filename to argument, shift args over; ... process("standard input", stdin, flags) ...
    (comp.programming)
  • Re: bypass shell - pipe into child pid and receive otput
    ... Passing '-' as the filename works as a shell command, ... convention that many programs support a filename of - to mean stdin (or ... If, as you say, passing '-' directly to htmldoc would have worked, then ...
    (comp.lang.perl.misc)