Ok, I am a little bit confused, normally it says that you should not add extension (like .sh) to the script, but I have noticed that, the system does not execute the script with no extension.
Why this happens?
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
running scripts on debian
running scripts on debian
Why do people use Visual Studio? It not logical to use VS because It is not capable with wine! Additionally, I failed my VC++ programming exam because I couldn't find the "compile" button in VS. If you know where it is please contact me.
Re: running scripts on debian
Some DEs define an association between the .sh file extension and the shell, much in the same way that they define an association, for example, between the .jpg extension and an image viewer. But that association is merely a convention and is by no means required. For any arbitrary file foo, you can run it as a shell script using
You can also identify a file as a script (as well as specifying an alternate interpreter) internally. Google shebang linux for more information.
Code: Select all
sh foo
Re: running scripts on debian
not really, because I created a file.desktop which is supposed to execute my script (very basic one -> #!/bin/bash and a command)debiman wrote:with "the system" do you perchance mean a file manager?
When I try to run the script then it doesn't work, but if I create a script with the .sh extension then it works.
resources (to make sure that you know what I am doing):
-http://www.cyberciti.biz/faq/howto-run- ... -in-linux/ ----> creating and running script
-http://askubuntu.com/questions/503127/s ... -extension -----> why I think script.sh is bad practice
Why do people use Visual Studio? It not logical to use VS because It is not capable with wine! Additionally, I failed my VC++ programming exam because I couldn't find the "compile" button in VS. If you know where it is please contact me.
Re: running scripts on debian
That doesn't sound right, I do name all my homade scripts with .sh extension just for clarity, and keep them in ~/binI created a file.desktop which is supposed to execute my script (very basic one -> #!/bin/bash and a command) When I try to run the script then it doesn't work, but if I create a script with the .sh extension then it works.
Scripts with any extension(no ext) will run on the Exec= line in a .desktop file, but you may need to put the complete path.
resigned by AI ChatGPT
-
- Posts: 1394
- Joined: 2007-03-04 21:10
- Location: U.S.A. - WI.
Re: running scripts on debian
m_p_w wrote:not really, because I created a file.desktop which is supposed to execute my script (very basic one -> #!/bin/bash and a command)debiman wrote:with "the system" do you perchance mean a file manager?
When I try to run the script then it doesn't work, but if I create a script with the .sh extension then it works.
resources (to make sure that you know what I am doing):
-http://www.cyberciti.biz/faq/howto-run- ... -in-linux/ ----> creating and running script
-http://askubuntu.com/questions/503127/s ... -extension -----> why I think script.sh is bad practice
One: make sure you have
Code: Select all
Exec = /path/to/my/script
three: make sure your .desktop isn't calling "myscript.sh" instead of "myscript" if if you don't use the extension.
four: There is nothing wrong with having the extension. In many cases, I use the .sh extension to differentiate scripts from binaries, especially if the scripts are usually executed from the system PATH.
Five: I didn't read through the second link, but it is from an Ubuntu user, and while there are some that are decent I'm sure, those USERS are not known to be the most technically savvy. Take what they say with a dump truck load full of salt...
six: this goes back to point four, in UNIX / Linux binaries don't REQUIRE an extension due to the "magic number", there also isn't anything preventing file extensions. In many cases extensions can be quite useful to differentiate between files.
EDIT: just read through the second link. Was a stupid as I thought. The poster was quoting Googles scripting guide for Google stuff ( internal stuff) and not anything else. Don't listen to him / her.
fortune -o
Your love life will be... interesting.
How did it know?
The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches
Your love life will be... interesting.
How did it know?
The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches