Results 1 to 3 of 3

Thread: Passing args to postscript

  1. #1
    Member
    Join Date
    Jul 2011
    Posts
    92
    Thanks
    2
    Thanked 5 Times in 5 Posts
    Rep Power
    3

    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
    Senior Member raj's Avatar
    Join Date
    Jun 2005
    Location
    Hyderabad
    Posts
    566
    Thanks
    57
    Thanked 41 Times in 38 Posts
    Rep Power
    14

    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
    92
    Thanks
    2
    Thanked 5 Times in 5 Posts
    Rep Power
    3

    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
  •