Possible Duplicate:
How to make a script that opens a terminals and execute commands in them
I want to know how to create a script that I could put on the desktop and execute on double-click so as to run a command in terminal.
I know how to make the script executable but do not know what text it should have.
For example, my command could be /etc/init.d/ccpd status
.
Creating an executable script like this
#!/bin/bash
/etc/init.d/ccpd status
does nothing, while in terminal it is like this:
~$ /etc/init.d/ccpd status
/usr/sbin/ccpd: 2568 2564
I am aware that my question looks similar to this here. But, trying to use that 10-up-voted definitive answer, it doesn't give me enough information so as to do it right.
What to do - according to that answer? Creating a script like this
#!/bin/bash
gnome-terminal -e [/etc/init.d/ccpd status]
gives error
How to modify the script to make it work?
Considering the closing as duplicate: i voted to close but now looking closer at the answers I see that this question clearly puts something that the other one just implies. I mean, one has to know the answer to this one (how to create the simplest script) just to understand the answers to the other. This maybe means it is not duplicate: or maybe a new answer/edit is needed in the other one in case this was closed.