|
|
Be careful with 3rd party apps/aliases
You will notice in my script above...
arguments to shell scripts
In my shell scripts, I found that using
$3 did not give me the file name. Perhaps it's because I use a preset printer setting instead of the standard setting. I get a *very* long $argv, most of which are printer option settings. It is the last argument, "$argv[$#]", that contains the pdf file.
Here's the code I use to convert the pdf file to postscript using the pdf2ps (courtesy of fink) command and save the ps file on the desktop:
arguments to shell scripts
I was trying the same thing with pdf2ps and or ps2pdf and having no luck - it was balking at the file. Any tips?
arguments to shell scripts
Try my script above for using pdf2ps. It works very nicely for me.
arguments to shell scripts
I get "TERM_PROGRAM: Undefined variable." in the Console log.
arguments to shell scripts
That's a different problem. Read this (and comments) to solve that bug:
arguments to shell scripts
Thanks for the tip, I solved that and now unless I comment out the line that dumps arg#2 into the log, the script pukes with "unknown user ./" or some such after dumping the majority of the CUPs arguments. Otherwise I can produce a .ps file, and even pipe it back through ps2pdf. I am posting a seperate note on that subject. By the way the tips for setting up the tcsh environment worked, but I had a heck of a time forcing the path to include "/usr/local/bin". I actually had to add it with ~/Library/init/tcsh/rc.mine because it wasn't getting picked up as expected?
oops: arguments to shell scripts
Oops. $argv[$#] is the same thing as $3 in this case. I didn't realized that $2 was a single argument of many space-separated strings. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.10 seconds |
|