Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!MITCH.ENG.SUN.COM!wmb From: wmb@MITCH.ENG.SUN.COM Newsgroups: comp.lang.forth Subject: More on system commands from Forth Message-ID: <9009262119.AA20487@ucbvax.Berkeley.EDU> Date: 26 Sep 90 21:01:02 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: wmb%MITCH.ENG.SUN.COM@SCFVM.GSFC.NASA.GOV Organization: The Internet Lines: 13 The way I handle Unix (substitute your favorite OS) commands from inside Forth right now is: I have Forth words for the most commonly used system commands, such as ls, rm, dir, cd, etc. These are either implemented directly in Forth, or by calling a command interpreter as a subprocess, whichever is convenient for the particular OS. For other system commands, I have a "shell escape". The command "sh" means "take the rest of the line and send it to a system command interpreter executed as a subprocess. Mitch