I created a new document, opened it with gedit and the script is very simple and it works in terminal, basically something like this:
#!/bin/sh
sudo blah blah blah
But when I save it on the document, put on the execution tick in the properties and double click the file then gedit simply opens it again so what is there I should do to make the file work as a shell script to launch the command, I searched, but nothing answers my question because everywhere it says (or so I believe) that having the first line #!/bin/sh turns the document into a shell script.