Not able to execute script using sh
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I am Not able to execute script using sh file_name
But it's working fine with command : ./filename
Rgrds
Aditya
scripts sh
New contributor
user3748987 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
1
down vote
favorite
I am Not able to execute script using sh file_name
But it's working fine with command : ./filename
Rgrds
Aditya
scripts sh
New contributor
user3748987 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
sh file_name
won''t work if the name of the file is filename not file_name.
– karel
31 mins ago
Usesh ./filename
instead ofsh file_name
– WinEunuuchs2Unix
30 mins ago
What do you mean by "not able to execute"? What message do you get?
– PerlDuck
9 mins ago
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am Not able to execute script using sh file_name
But it's working fine with command : ./filename
Rgrds
Aditya
scripts sh
New contributor
user3748987 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I am Not able to execute script using sh file_name
But it's working fine with command : ./filename
Rgrds
Aditya
scripts sh
scripts sh
New contributor
user3748987 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user3748987 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user3748987 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 34 mins ago
user3748987
61
61
New contributor
user3748987 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user3748987 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
user3748987 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
sh file_name
won''t work if the name of the file is filename not file_name.
– karel
31 mins ago
Usesh ./filename
instead ofsh file_name
– WinEunuuchs2Unix
30 mins ago
What do you mean by "not able to execute"? What message do you get?
– PerlDuck
9 mins ago
add a comment |Â
1
sh file_name
won''t work if the name of the file is filename not file_name.
– karel
31 mins ago
Usesh ./filename
instead ofsh file_name
– WinEunuuchs2Unix
30 mins ago
What do you mean by "not able to execute"? What message do you get?
– PerlDuck
9 mins ago
1
1
sh file_name
won''t work if the name of the file is filename not file_name.– karel
31 mins ago
sh file_name
won''t work if the name of the file is filename not file_name.– karel
31 mins ago
Use
sh ./filename
instead of sh file_name
– WinEunuuchs2Unix
30 mins ago
Use
sh ./filename
instead of sh file_name
– WinEunuuchs2Unix
30 mins ago
What do you mean by "not able to execute"? What message do you get?
– PerlDuck
9 mins ago
What do you mean by "not able to execute"? What message do you get?
– PerlDuck
9 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
On Ubuntu, sh
(or more accurately, /bin/sh
) is "dash" and not "bash". When you use sh filename
you force the script to be interpreted by dash
. When you use ./filename
the script is interpreted by whatever the "shebang" (#!...
on first line) says, and this is normally the interpreter the script has been written for (bash
, likely).
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
On Ubuntu, sh
(or more accurately, /bin/sh
) is "dash" and not "bash". When you use sh filename
you force the script to be interpreted by dash
. When you use ./filename
the script is interpreted by whatever the "shebang" (#!...
on first line) says, and this is normally the interpreter the script has been written for (bash
, likely).
add a comment |Â
up vote
3
down vote
On Ubuntu, sh
(or more accurately, /bin/sh
) is "dash" and not "bash". When you use sh filename
you force the script to be interpreted by dash
. When you use ./filename
the script is interpreted by whatever the "shebang" (#!...
on first line) says, and this is normally the interpreter the script has been written for (bash
, likely).
add a comment |Â
up vote
3
down vote
up vote
3
down vote
On Ubuntu, sh
(or more accurately, /bin/sh
) is "dash" and not "bash". When you use sh filename
you force the script to be interpreted by dash
. When you use ./filename
the script is interpreted by whatever the "shebang" (#!...
on first line) says, and this is normally the interpreter the script has been written for (bash
, likely).
On Ubuntu, sh
(or more accurately, /bin/sh
) is "dash" and not "bash". When you use sh filename
you force the script to be interpreted by dash
. When you use ./filename
the script is interpreted by whatever the "shebang" (#!...
on first line) says, and this is normally the interpreter the script has been written for (bash
, likely).
answered 23 mins ago


xenoid
1,0431314
1,0431314
add a comment |Â
add a comment |Â
user3748987 is a new contributor. Be nice, and check out our Code of Conduct.
user3748987 is a new contributor. Be nice, and check out our Code of Conduct.
user3748987 is a new contributor. Be nice, and check out our Code of Conduct.
user3748987 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1082236%2fnot-able-to-execute-script-using-sh-file-name%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
sh file_name
won''t work if the name of the file is filename not file_name.– karel
31 mins ago
Use
sh ./filename
instead ofsh file_name
– WinEunuuchs2Unix
30 mins ago
What do you mean by "not able to execute"? What message do you get?
– PerlDuck
9 mins ago