Results 1 to 3 of 3

Thread: Passing args to postscript

  1. #1
    Member
    Join Date
    Jul 2011
    Posts
    69
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    2

    Default Passing args to postscript

    I have had no satisfactory results searching the web for methods of passing values to the post/GhostScript program I have in Slackware. I have a PS written to create stick figures for use in a book I want to illustrate. Being able to pass args could also mean creating videos of same.
    I need an example of how PS would process it. Seeing how it was done in shell script (bash, bourne, NOT tch) would be useful.
    If there is a fairly direct means (no file passing) of getting args to a PS from a shell script I would find it wonderful. Thanks
    Last edited by timtravlr; 24th May 2012 at 08:45 AM.

  2. #2
    raj
    raj is offline
    Senior Member raj's Avatar
    Join Date
    Jun 2005
    Location
    Hyderabad
    Posts
    550
    Thanks
    55
    Thanked 39 Times in 36 Posts
    Rep Power
    12

    Default

    You pass it as follows:

    Code:
    /path/to/ps arg1 arg2
    /path/to/ps -option1 arg1 -option2 arg2
    Provide a little more info so that we can help you better.
    Raj
    Linux rulz.
    I have never turned back in my life ; I shall not do so today.. haha

  3. #3
    Member
    Join Date
    Jul 2011
    Posts
    69
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    2

    Default

    Just so we are clear, PS is acronym for PostScript, since U used ps as the program to which the args are being passed. My question is deeper as I do not know how postscript handles arguments past to it. How do I put them into an array and also onto the stack so I can say: "/myargname itsvalue def" for example in the latter case. How is postscript treating -option1/2 and what are they and where can I read on this? Thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 8th December 2011, 10:39 AM
  2. passing variable between 2 files
    By beginner in forum Shell scripting
    Replies: 6
    Last Post: 8th November 2010, 07:50 AM
  3. [Solved] Bash Input infinite Args
    By jaysunn in forum Shell scripting
    Replies: 2
    Last Post: 22nd July 2010, 05:43 AM
  4. ssh passing paramters
    By trickstar in forum Shell scripting
    Replies: 1
    Last Post: 16th December 2008, 01:38 PM
  5. passing options to a shell script
    By bigpaw in forum Shell scripting
    Replies: 2
    Last Post: 11th October 2007, 02:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41