dynamic global script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting dynamic global script
# 1  
Old 01-24-2007
dynamic global script

Hi,

I have to create a global dynamic script which should ask for the env or some other variables and then create the soft links.

let's say that I have to create ten soft links and the path for these soft links is different for each env

for e.g:
WDEV: /d02/app/applmgr/wdev/appl/CDCRM/bin
WSTG: /d02/app/applmgr/wdev/appl/CDCRM/bin

and the command for soft link is

ln -s /d02/app/applmgr/wdev/appl/fnd/11.5.0/fndcpesr /d02/app/applmgr/wdev/aappl/CDCRM/11.5.0/QC_LDAP_OUT

Is there is a way that I can generate the following two paths dynamically:

/d02/app/applmgr/wdev/appl/fnd/11.5.0/fndcpesr
/d02/app/applmgr/wdev/aappl/CDCRM/11.5.0/
# 2  
Old 01-24-2007
Not based on the information you provided.

What do you mean by the lines the following lines?

WDEV: /d02/app/applmgr/wdev/appl/CDCRM/bin
WSTG: /d02/app/applmgr/wdev/appl/CDCRM/bin

Are "WDEV" and "WSTG" environment variables and is their value "/d02/app/applmgr/wdev/appl/CDCRM/bin"?

Are they supposed to be identical?

If these are variables, how do they relate to the link that has to be created?

You need to be a bit more clear, at least for me to understand what you really want.
# 3  
Old 01-24-2007
trying to be more clear

Hi SB008,

I know, I wasn't sure in my first post. This is a oracle applications env and there are two env's.

$FND_TOP=/d02/app/applmgr/wdev/fnd/11.5.0
$CDCRM_top==/d02/app/applmgr/wdev/cdcrm/11.5.0

Now the above mentioned values are for wdev database.

let's say that for wbfix env the env's are going to be following:

$FND_TOP=/d02/app/apwbfix/wbfix/fnd/11.5.0
$CDCRM_top==/d02/app/apwbfix/wbfix/cdcrm/11.5.0

Now, I have to create a global script which can be run against any of the above env's for creating the soft links.

and the command I am using for soft links is :

ln -s /d02/app/applmgr/wdev/fnd/11.5.0/fndcpesr /d02/app/applmgr/wdev/cdcrm/11.5.0/app_soft_link1

and these paths are going to change with each env.

so I am kind of confused whether to use case, but than again you have to change the script everytime you add database and this script can't be used for different servers. So If somehow I can get these values from the env itself.

one more thing, If I have these variables set, is it possible to get those into the script.

TIA,
Inder
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Date and time change in global and non global zone

Hi, If I change date and time in global zone, then it will affect in non global zones. During this process what files will get affect in non global zones and which mechanism it's using to change. gloabl zone:Solaris 11.3 X86 TIA (1 Reply)
Discussion started by: Sumanthsv
1 Replies

2. Solaris

Global and non-global zone resource sharing - tricky

hi all, Just a simple question but i cant get the answers in the book - In my globalzone , assuming i have 4 cpus (psrinfo -pv = 0-3), if i set dedicated-cpu (ncpus=2) for my local zone Is my globalzone left with 2 cpus or still 4 cpus ? Does localzone "resource reservation.e.g. cpu in... (6 Replies)
Discussion started by: javanoob
6 Replies

3. Solaris

How to identify a global or non-global Solaris server?

Hi, I have Solaris zone configured with Solaris 9 and 10. In Solaris 10(non global), I use the command “zonename” to get whether it is global or non-global server. For Solaris 9, what command I can use to get whether it is global or non-global server. Regards, Kalai :confused: (25 Replies)
Discussion started by: kalpeer
25 Replies

4. Solaris

How to see global hostname by logging in non global zones?

Hi guru Could any one help me by letting me know, how to see global hostname by logging in non global zones Regards (2 Replies)
Discussion started by: girish.batra
2 Replies

5. Solaris

How to access ENV variables of non global zones in global zone???

Hi Guys, My requirement is I have file called /opt/orahome/.profile in non global zone. PATH=/usr/bin:/usr/ucb:/etc:/usr/sbin:/usr/local/bin:/usr/openwin/bin:. export PATH PS1="\${ORACLE_SID}:`hostname`:\$PWD$ " export PS1 EDITOR=vi export EDITOR ENV=/opt/orahome/.kshrc export ENV... (1 Reply)
Discussion started by: vijaysachin
1 Replies

6. Solaris

Is there two different kernel`s running in global and non global zone?

Hi All, I want to know for non global zone there will be different kernal running? (1 Reply)
Discussion started by: vijaysachin
1 Replies

7. Solaris

How can we copy a directory from Global to Non-global zone?

Hi All, How can we copy a directory from global zone to non-global zone using SCP command? (8 Replies)
Discussion started by: vijaysachin
8 Replies

8. UNIX for Advanced & Expert Users

Sql dynamic table / dynamic inserts

I have a file that reads File (X.txt) Contents of record 1: rdrDESTINATION_ADDRESS (String) "91 971502573813" rdrDESTINATION_IMSI (String) "000000000000000" rdrORIGINATING_ADDRESS (String) "d0 movies" rdrORIGINATING_IMSI (String) "000000000000000" rdrTRAFFIC_EVENT_TIME... (0 Replies)
Discussion started by: magedfawzy
0 Replies

9. Programming

global variables and dynamic allocation

Hi, is it possible in C to allocate dynamically a global variable?? (3 Replies)
Discussion started by: littleboyblu
3 Replies

10. Shell Programming and Scripting

Global Variable in a script?

How to create a Global variable within a script file. say i want a varaible called LOGFILE to be used within all the script. how to do that? (2 Replies)
Discussion started by: skyineyes
2 Replies
Login or Register to Ask a Question