/bin/ksh: scriptname: not found. ???
I have started to write Korn scripts on the client's AIX 4.2 servers and there is this small problem that puzzles me.
I code all my scripts the same way:
- first line contains :
#!/bin/ksh
- I do this console command on every scripts:
chmod +x scriptname
But still, on some occasions, when running a script (ex: called scriptname.sh), I get an error that I do not understand:
/bin/ksh: scriptname.sh: not found.
It does not always happen but when it happens, its when I am trying to run a new script for the first time. Once it starts to happen, the only way to run that script is to :
ksh scriptname.sh
If a script never had this from the start, it will never happen to it. When logging in with my user-id, the first thing I do is sudo su -
Why is this happening ?
Am I forgetting to do something ?
I do not recall if it is happening on specific servers or not.
|