If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Help writing a small unix shell script

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-07-04, 20:12
lbaker lbaker is offline
Registered User
 
Join Date: Oct 2004
Posts: 1
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
Reply With Quote
  #2 (permalink)  
Old 10-07-04, 21:30
vgersh99 vgersh99 is offline
Registered User
 
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> |
+-----------------------+
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On