problem executing user created scripts on console
I am facing a strange problem in RHEL4. I am trying to write and execute a simple script on console but not able to execute that script.
Script file contains
if I try to excute the script in GUI environment I am able to execute it successfully. Also I am able to execute the script using telnet session.
But if i am at console and execute the following command
it just does nothing and does not even come out on the shell, I have to press cntrl + c to come out on shell again.
the command i execute at all the places is ./hi
('hi' is the filename). this works with telnet and gui but not on console. Also strange thing is that if I add the below mentioned line at the begining of the file
then it seems to work fine. I just wanted to know is there any path that I need to set for console to make it work. I am not interested in adding the above mentioned line because my actual files are too many.