When given a binary in a terminal, you can launch it via
sh myapp
or
./myapp
Are there any other ways to launch the app? Is there any difference between sh and ./ ? What do they denote/stand for?
When given a binary in a terminal, you can launch it via
sh myapp
or
./myapp
Are there any other ways to launch the app? Is there any difference between sh and ./ ? What do they denote/stand for?
There are differences between them.
Let's look at the first one:
sh myapp
It opens myapp
in sh
.
The command may not work with binaries as muru said.
Let's look at the second one:
./myapp
It tells the shell to open myapp
. The shell gets the app set as preferred and then sends to the application command to open the app.
I remember that the sh
way doesn't require executive rights. (may someone who is sure confirm?)
sh myapp
, shell scripts can be run that way. – muru Apr 04 '15 at 06:14