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 .

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

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).

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 .