
Running a DOS-application directly from Unix shell:
--------------------------------------------------

1. Make a file "FILE" containing all keystrokes you need to boot dosemu
   and to start your dos-application, ... and don't forget to have CRLF
   for 'ENTER'. FILE may look like this (as on my machine):

     2^M                    <== this chooses point 2 of the boot menu
     dir > C:\garbage^M     <== this executes 'dir', result to 'garbage'
     exitemu^M              <== this terminates dosemu

   (the ^M stands for CR)

2. execute dosemu on a spare (not used) console, maybe /dev/tty20
   such like this:

   # dos -D-a 2>/dev/null <FILE >/dev/tty20

   This will _not_ switch to /dev/tty20, but silently execute dosemu
   and you will get the '#' prompt back, when dosemu returns.

I tested this with dosemu-0.64.4/Linux-2.0.28 and it works fine.

When your dos-app does only normal printout (text), then you may
even do this

   # dos -D-a 2>/dev/null <FILE >FILE.out

FILE.out then contains the output from the dos-app, but merged with
ESC-sequences from Slang.

You may elaborate this technique by writing a script, which gets the
dos-command to execute from the commandline and generate 'FILE' for you.

When you try to use one of the above to start dosemu out of a crontab,
then you have to asure, that the process has a proper environement set up
( especially the TERM and/or TERMCAP variable ).

Hans
<lermen@fgan.de>
