Re: How to start a program that must be run from a shell

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Claude Jones wrote:
Excuse me if this is another answer in my face question:
I have a simple program - in order to run it, I have to open a shell and type in the program name and arguments; it then opens a second shell or window depending on the arguments and runs - this is dosemu for the inquisitive a 'dos in a box' program to run dos legacy stuff.


I would like to create a simple executable script that I could place on my desktop to run this sequence. I can't figure out how. I've tried simply writing a one line file that contains the program and arguments, and making that executable, but that doesn't work. I think there's that extra step of invoking a shell first that has to happen. If I press alt-f2 and type in the program in the command window, that works, so how do I turns those two steps into one executable?

The first line of your file must be "#!/bin/bash" to invoke the shell.
The Hash-Bang (#!) in the first two bytes act like a magic number to tell the loader to look for a (full path to) a program that will read your command. All you need is the two lines:


#!/bin/bash
dosemu -whatever


-- Oisin "Magic answer" Curtin



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux