![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| bourne shell or korn shell? | XZOR | UNIX for Dummies Questions & Answers | 2 | 10-06-2006 02:34 AM |
| Bourne-again shell | mrsamer | UNIX for Dummies Questions & Answers | 3 | 09-30-2006 02:42 AM |
| cd from a Bourne Shell Script - Please Help | fawqati | Shell Programming and Scripting | 10 | 05-25-2006 03:26 AM |
| Bourne Shell and Arrays | Unbeliever | Shell Programming and Scripting | 2 | 07-25-2005 10:48 AM |
| Bourne Shell Script | dmhonor914 | UNIX for Dummies Questions & Answers | 2 | 12-10-2003 12:25 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
C shell & Bourne Shell
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 $ Thanks |
|
||||
|
Quote:
and to the variable log_path you are assigning the result of a command or a script after executing them so in bash if its like Code:
var=`command` echo $var Please do check that. |
|
||||
|
Thanks for that .. can u please explain :-
$ ./get_property_value.sh LOG_PATH $BLMBRGDATA/blmbrg.properties /home/mahalja/sbclocal/dyn/data/blmbrg_pricing/logs $ get_property_value.sh LOG_PATH $BLMBRGDATA/blmbrg.properties get_property_value.sh: not found thanks.. |
|
||||
|
Quote:
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 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|