Re: Unix equivalent of Dos commands

From: Bill Campbell (bill_at_celestial.com)
Date: 06/25/03


Date: Wed, 25 Jun 2003 17:29:24 GMT
To: Sco Mailing List <scomsc@xenitec.on.ca>

On Wed, Jun 25, 2003 at 10:44:19AM -0600, justin wrote:
>I am trying to send strings of data to a customer display connect to
>/dev/tty2a in Openserver 5.0.5. The use manual explains how to do this in
>dos, but I want to test in out in unix. The manual says to do the following
>dos commands:
>
>mode com1 96,n,8,1
>type con>com1
>
>then type "!#1ABCDEFGH" and press enter. The display will show "ABCDEFGH"
>on the first line. Press Ctrl-C to end.
>
>In dos, I can sit there all day and type in various strings and it works,
>but I don't know how to do this in unix. I believe that I have the settings
>for tty2a set correctly as I can type echo $string > /dev/tty2a and it
>displays. The problem with this testing is that the device has to be reset
>after each line because it needs a cr/lf to end one line and begin accepting
>another.

The ususal answer is ``there's more than one way to do it''. The Unix
``write'' command is traditionally the way this is done.

Writing directly to a user's tty device may work, but probably won't on a
properly configured system since it has many security implications. (how
would you like to be running as root and have your F1 key reprogrammed to
send ``rm -fr /'')?

Things are muth more compilicated in a multi-user environment than on the
average DOS/Windows machine where there's only one user with one console
device. Even if I'm running an *ix box from the console, there are 12
different ttys I might be on so how do you know which one to write to (when
I was running Xenix I used all 12 of them)?

Bill

--
INTERNET:   bill@Celestial.COM  Bill Campbell; Celestial Software LLC
UUCP:               camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/
``It is better to die on your feet than to live on your knees!''
    -- Emiliano Zapata.


Relevant Pages

  • Unix equivalent of Dos commands
    ... /dev/tty2a in Openserver 5.0.5. ... dos, but I want to test in out in unix. ... In dos, I can sit there all day and type in various strings and it works, ... but I don't know how to do this in unix. ...
    (comp.unix.sco.misc)
  • Re: Unix equivalent of Dos commands
    ... > dos, but I want to test in out in unix. ... > In dos, I can sit there all day and type in various strings and it works, ... > but I don't know how to do this in unix. ... Read the man page for echo ...
    (comp.unix.sco.misc)
  • Re: Big Mikey --- Your (sic) Not Choking On US, Are You?
    ... This class is a basic UNIX beginners one day UNIX course, Steve Highly ... DOS is far from Antiquated. ... Many A+ students, ...
    (alt.vacation.las-vegas)
  • Re: Unix connection to a Windows Server
    ... > that interpet other scripting languages but no DOS, ... > What Unix, version, and hardware? ... The Linux DOS Emulator DOSEMU is a PC Emulator ... And there's always Samba: ...
    (comp.unix.shell)
  • Re: Review of my performance analysis
    ... DOS vs Unix really tells you little as very disk op in DOS will ... And SCSI vs MFM - and the ability of SCSI to do many ops [depending ... Frragmentation isn't nearly the problem in Unix system as it is ...
    (comp.unix.sco.misc)