Shell scripts are the equivalent to the MS world's batch scripts. A very simple BASH shell script would be:
echo "this" > /home/myname/output.txt
Make the script executable (chmod a+x) to allow launching from the Desktop by double-clicking.
Under Gnome launching a shell script will bring up a confirmation dialog - Gnome is known to distrust the intelligence of users, but in the end it's good security.
When using Konqueror under KDE the double clicking executes the script immediately. You can use Konqueror also under Gnome. I prefer KDE stuff for applications, but use Gnome as my main desktop - you don't get much weirder than that in times of Gnome-KDE flame wars. I assume that other window managers have their own ways of dealing with double-clicked shell scripts.
You also have the choice of using kdialog to combine scripting with generating GUI dialogs. Quite handy!
It's a good practice to use full pathnames in scripts, to allow them to be run as cron jobs or to be launched by double-clicking also for other users.