Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hi,
I am working in Solaris 7 environment and on ksh. If I write a shell program in textpad,save and try executing it..,the program doesn't run.
Whereas, if i run the same in ksh command line ., the program runs. Likewise, if I add the program in .kshrc file and run it using any alias name..the program runs.So my query is.., how do I execute the shell program written in a textpad.
i.e.,
Say I write a shell program and save it in a textpad say "test".
Now, i should be able to run the program by mere typing the file name "test".Can anyone please answer this..

You need to make the script executable.
chmod 775 test
If your current directory is not listing in your path prepend the script name the ./ when trying to execute.
./test
alternately, you could either modify your path or save the scripts in a directory already in your path.

btw, "test" is already a Unix command (see "man test") and so may not be the best choice for a test script name.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |