Command to run .sh file?

I don’t know much about telnet, I have the file called (ezpublish file), What command should I type to run that file? thx

I assume you are talking about linux or some flavor of unix. You have to do 2 things:

1.) chmod 700

First line will give you “permissions” to execute the file, and second line will execute the file.

Good luck!

thanks ahajdar, I’m using telnet, and from bash command line:


I tried to run the file by going to its directory and type the name but it gave me an error

bash: command not found

any idea?

never mind, I got it worked :), thanks.

Hey stinky,

Glad to hear you got it working… Not sure how you did it but maybe you could possibly post it here so anyone else experiencing similar problems might get an answer…

I know when I first started with unix I had a similar problem runing my perl scripts and the answer was quite simple… all I had to do was add ./ in from of the script name… ie. instead of just typing I had to type ./ Another alternative is to type the entire server path to the script, or yet another solution for perl scripts is to type ‘perl’.

anyway, enough rambling. Hopefully you can help out some unix newbies by posting your solution!!


This is all due to what you set the $PATH variable to in your shell environment. $PATH contains a set of paths that contains binaries that you wish to execute without typing in the absolute path to execute it…

Example, if my path was /usr/local/bin:/bin:/usr/bin
I can run anything in /usr/local/bin, /bin, and /usr/bin without typing it all out in the command line.

So essentially, to avoid having to type ./filename to execute, just add . to the path, which is the current working directory.