Err...

# ./script

is when you are in the current directory of the script.

# script

Is doable when the script is in a directory in your $PATH variable. In
your case it isn't.  In which case you'll need to do the full path (or
if you are in the same directory the "./". 

I feel like I missed something...

-Bryan

Brock Noland wrote:

>When running script which is not in my path I have always used
>./script_name. However at my current job most people are used not
>having to use the ./.  My question is how do you get scripts to run
>WITHOUT the ./?
>
>**For example on this machine it works with the ./**
>[was at kent newShell]$ pwd
>/was/WebSphere/DeploymentManager/scripts/newShell
>[was at kent newShell]$ echo $PATH
>/IBMJava2-131/bin:/IBMJava2-131/jre/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/was/bin:.
>[was at kent newShell]$ wasAdmin.sh
>Agent pid 9410
>Enter passphrase for /home/was/.ssh/wasAdminkey_dsa:
>[was at kent newShell]$ ./wasAdmin.sh
>Agent pid 9417
>Enter passphrase for /home/was/.ssh/wasAdminkey_dsa:
>[was at kent newShell]$
>
>**But on this machine the ./ is not optional**
>ns0001-06 /home/was $cd /was/WebSphere/DeploymentManager/scripts/newShell/
>ns0001-06 /was/WebSphere/DeploymentManager/scripts/newShell $pwd
>/was/WebSphere/DeploymentManager/scripts/newShell
>ns0001-06 /was/WebSphere/DeploymentManager/scripts/newShell $echo $PATH
>/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/db2/db2inst1/sqllib/bin:/db2/db2inst1/sqllib/adm:/db2/db2inst1/sqllib/misc
>ns0001-06 /was/WebSphere/DeploymentManager/scripts/newShell $wasAdmin.sh
>-bash: wasAdmin.sh: command not found
>ns0001-06 /was/WebSphere/DeploymentManager/scripts/newShell $./wasAdmin.sh
>Agent pid 18846
>Enter passphrase for /home/was/.ssh/wasAdminkey_dsa:
>ns0001-06 /was/WebSphere/DeploymentManager/scripts/newShell $
>
>I assume this is shell setting, but which one?
>
>Brock
>
>_______________________________________________
>TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
>tclug-list at mn-linux.org
>http://mailman.mn-linux.org/mailman/listinfo/tclug-list
>
>.
>
>  
>