Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004
    Posts
    1

    Unanswered: Help writing a small unix shell script

    I need help pulling in temporary environment variables from one script to another. I thought I could use the cut command, but it's not working properly. The intent was to create the ctlclient script once without having to dupliate the information into the ctl script. When ever I kicked off "ctl" script, I would like the variables from 'ctlclient" pulled in until the script has completed. The variables may not be in the same order for every file.

    Example:

    File: ctl - located on /j1/j12345
    JOBNO=
    CLIENT=
    PROJECT=
    Other variables ...

    File: ctlclient - located on /j1/j12345/raw
    JOBNO="12345"
    CLIENT="Client Name"
    PROJECT="Client Project"

    I'm not a shell script guru by any means. Who ever could help me would be greatly appreciated

  2. #2
    Join Date
    Apr 2004
    Location
    Boston, MA
    Posts
    325
    #!/bin/ksh
    #File: ctl - located on /j1/j12345
    JOBNO=
    CLIENT=
    PROJECT=

    # 'run' the ctlclient from the ctl script - pay attention to the leading '.'
    #File: ctlclient - located on /j1/j12345/raw#
    . /j1/j12345/raw
    vlad
    +-----------------------+
    | #include <disclaimer.h> |
    +-----------------------+

Posting Permissions

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