August, 2002 (Release 7)
Mac MacOS X brings a wealth of commands with its UNIX foundation. These commands are easy to access from FutureBasic. You may establish one or several simultaneous channels by opening them as files. Each channel should have a unique file number. There is a theoretical maximum of 255 files or channels that may be opened at once.
Once the channel has been opened, you read from the file to accept the resulting list from UNIX. (Exception: some UNIX commands perform a task without responding to the user, so no file reading is required.) When the operation is complete, close the channel as you would any file; with the
There are literally hundreds of books written about UNIX commands. Suffice it to say that if the Mac supports a specific UNIX command, it may be accessed through
dim as Str255 a
window 1,, (0,0)-(600,550)
text _monaco, 10
// print a title-string then list a directory
open "UNIX", 2, "echo ""Root Directory""; ls -l"
line input #2, A
open "UNIX" works only in MacOS X.
line input; close