Hi Guys,
My first post and simple one at that .. Really rusty with this shell scripting..\
I have a script called .. j.sh
I am calling
> j.sh LOG_PATH $BLMBRGDATA/blmbrg.properties
where j.sh is grep $1 $2 | cut -d',' -f2 .
$BLMBRGDATA is set to a directory path.
why do i get :-
$ get_property_value.sh LOG_PATH $BLMBRGDATA/blmbrg.properties
get_property_value.sh: not found
$ ./get_property_value.sh LOG_PATH $BLMBRGDATA/blmbrg.properties
/home/mahalja/sbclocal/dyn/data/blmbrg_pricing/log
and
why does this not work ?
$ set log_path = `./get_property_value.sh LOG_PATH $BLMBRGDATA/blmbrg.properties`
$ echo $log_path
$ set log_path `./get_property_value.sh LOG_PATH $BLMBRGDATA/blmbrg.properties`
$ echo $log_path
This script get_property_value.sh is executed from the directory where it is created and the directory is not available in $PATH.
Hence, get_property_value.sh when it is executed from the directory where its available, ( as ./get_property_value.sh ) the interpretor would identify that the script is available in the current directory and executes that.
But when executed as get_property_value.sh it would search for the values in the var $PATH and since its not available in the PATH env var it is displaying as not found