Mailinglist Archive: opensuse (818 mails)

< Previous Next >
[opensuse] different types of shell scripts
I downloaded a program that I needed off the internet and the installation program was a script file with the extension .sh. The instructions from the developer said to run the script on a command line by typing the command:

./<filename>

I thought (mistakenly) that I could run any shell script by typing the command . <filename> (with a space between the dot and the filename). So I tried to run it that way, and I got the error "cannot execute binary file".

However, when I followed the developer's instructions and typed in ./<filename>, the script executed perfectly and installed the program.

So my question is, what is the difference between running a script file with the command

<dot><space><filename>, for example "#> . myscript.sh"

and running it with

<dot><slash><filename>, for example "#> ./myscript.sh"?

G
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >