Re: how to write this simple script command?



On 2008-01-31, www <www@xxxxxxxxxx> wrote:

Thank you. I have just figured out myself. Following is better, because
foo.txt will get foo.txt.pdf and bar.txt will get bar.txt.pdf

#!/bin/bash
a2ps --output=$1.ps $1
ps2pdf $1.ps
rm -f $1.ps

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

--
kkeller-usenet@xxxxxxxxxxxxxxxxxxxxxxxxxx
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

.



Relevant Pages

  • Re: Dangerous use of ls
    ... Not all of us admin a box where we are the only user ever. ... (try just my userid to email me) ... see X- headers for PGP signature information ...
    (comp.unix.shell)
  • Re: popular hockey
    ... Markku? ... (try just my userid to email me) ... see X- headers for PGP signature information ...
    (rec.sport.hockey)
  • Re: Help finding CGI files on Unix server
    ... Post the Perl code that you've tried. ... (try just my userid to email me) ... see X- headers for PGP signature information ...
    (comp.lang.perl.misc)
  • Re: virtual reality
    ... Ask ''Tom Newton'' about his ODE project. ... (try just my userid to email me) ... see X- headers for PGP signature information ...
    (comp.os.linux.misc)
  • Re: What does this mean?
    ... (try just my userid to email me) ... see X- headers for PGP signature information ... Prev by Date: ...
    (comp.os.linux.misc)