Identify the Parameter variable file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Identify the Parameter variable file
# 1  
Old 08-08-2017
Identify the Parameter variable file

Hi

I am trying to understand a shell scipt file ( .ksh file ) . In the shell script we are referring a variable .

Code:
Example : SessLogs=$STAFF_MSTR_DIR/staff_dtls

There are no references in the shell script from where the variable "$STAFF_MSTR_DIR" is being read from .

Could anyone please help me understand from where the Variable :"$STAFF_MSTR_DIR" is being referred.

Thanks
# 2  
Old 08-08-2017
Welcome to the forum.

If you don't find the variable definition in your script, it could
- source
- be sourced / run from
another script in which the variable is defined (and exported).
# 3  
Old 08-08-2017
Variables can also be defined in one of your login shell's startup scripts. Depending on what shell you're using (not necessarily that shell that is used to run the script you're asking about), the startup scripts could have different names. You might start by looking at a file named .profile in your home directory and at the file named /etc/profile.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Passing parameter filled variable to a script.

Say I have something like this to try and build a parameter string: OPT1="This is my Option"; OPT2="/folder/file"; PARMS="-u me -J \"$OPT1\" -g \"$OPT2\""; ./script.ksh -n 1 $PARMS; ./script.ksh -n 2 $PARMS; ./script.ksh -n 3 $PARMS; ./script.ksh -n 4 $PARMS; But this doesn't work. ... (2 Replies)
Discussion started by: Devyn
2 Replies

2. Shell Programming and Scripting

Resolve parameter value stored in a variable

Hi All, I have below variable, xyz=\$AI_XFR Now, if you will run the below command => echo $xyz $AI_XFR It is returning hardcoded string value. Whereas in environment, there is value in it. Like below: => echo $AI_XFR /home/aditya/sandbox/xfr/ I need to resolve this... (4 Replies)
Discussion started by: adgangwar
4 Replies

3. Shell Programming and Scripting

How to get the parameter value from the parameter file in perl?

hi all, i have a parameter file of following format, i want a method which can get the value of specific parameter. parameter file format: <Parameter Name="FileLocationWindows"> <Description> The directory location of the logger file. ... (1 Reply)
Discussion started by: laxmikant.hcl
1 Replies

4. Shell Programming and Scripting

variable parameter assigning prblms

Hi, In my script, there is a variable as below TME=`date +%H` I want to take this TME value into another variable called TME_PAR which i can use outside of the current script and this TME_PAR is already present in my home_dir and i wrote below line of code $home_dir/$TME_PAR=`echo... (1 Reply)
Discussion started by: JSKOBS
1 Replies

5. Shell Programming and Scripting

How to pass a function with a variable parameter into another variable?

Hello again :) Am currently trying to write a function which will delete a record from a file. The code currently looks as such: function deleteRecord() { clear read -p "Please enter the ID of the record you wish to remove: " strID ... (2 Replies)
Discussion started by: U_C_Dispatj
2 Replies

6. Shell Programming and Scripting

Reading a variable from parameter file

HI all, I have a parameter file with entries like $$Name =Abhinav $$CUTOFF_DATE = 11/11/2209 I am reading a variable from this file using a awk command like : var2=`awk -F"" "/CUTOFF_DATE/{f=$1;}{print f;}" InputFIleName` but facing an error like awk: cmd. line:1:... (3 Replies)
Discussion started by: abhinav192
3 Replies

7. Shell Programming and Scripting

Parameter Problem With an Array Variable

Hi, I have two bash shell scripts: test: rrdhcp78-120:test_data msb65$ cat ~/bin/test #!/bin/sh array1=() echo 'elements in array1:' ${#array1} ~/bin/test2 $array1 test2: rrdhcp78-120:test_data msb65$ cat ~/bin/test2 #!/bin/sh array2=${1} (5 Replies)
Discussion started by: msb65
5 Replies

8. UNIX for Dummies Questions & Answers

Can a variable be used as a cut fieldname parameter?

Hi, Is it possible to use a variable as a fieldname parameter for the cut command. I am trying to extract fields from a variable. Say that I want to cut the fields 1,3,5,7,9, etc, but I don't know how many fields that the variable will have i.e. could be 100 or more. I thought that I could use... (3 Replies)
Discussion started by: Knotty
3 Replies

9. Shell Programming and Scripting

Assign value to a variable in a parameter file

Hi, I have a parameter file and it contains following items $ cat TransactionParams From_Date_Parm=2005-02-25 To_Date_Parm=2005-05-25 Extract_Root_Parm=/detld1/etl/ascential/Ascential/DataStage/Projects/CTI_London/IAM Extract_Type_Parm=Transaction EDW_Database_Parm=hdw_erks... (2 Replies)
Discussion started by: gopskrish
2 Replies

10. Shell Programming and Scripting

How to check parameter variable?

Hello All, I have a script that will email out if the email address is specified as parameter 1. I am using ksh, and then tried the following : email=$1 Following did not work, I am getting error test -z $email test ${email:=" ") -eq " " test -n $email test ${?email} What... (4 Replies)
Discussion started by: negixx
4 Replies
Login or Register to Ask a Question