The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
dynamic editing using shell script habzone2007 Shell Programming and Scripting 1 05-14-2008 11:55 PM
Unix script to do a global change progkcp UNIX for Dummies Questions & Answers 7 05-13-2008 03:20 AM
How to declare global variables for shell script risshanth UNIX for Dummies Questions & Answers 2 10-31-2007 03:27 AM
setting a global variable in script arunkumar_mca UNIX for Dummies Questions & Answers 3 10-23-2007 08:46 AM
Global Variable in a script? skyineyes Shell Programming and Scripting 2 07-12-2007 07:55 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-24-2007
isingh786 isingh786 is offline
Registered User
  
 

Join Date: Aug 2005
Posts: 75
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 (permalink)  
Old 01-24-2007
sb008 sb008 is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 384
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 (permalink)  
Old 01-24-2007
isingh786 isingh786 is offline
Registered User
  
 

Join Date: Aug 2005
Posts: 75
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
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:27 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0