
                            [42m CLI FUNDAMENTALS [0m

                           [3m From George Knight [0m



   Ed: This is a fine tutorial on how to run programs from the CLI - George
  asks you to contact him or us if you'd like to see more of these in
  Megadisc. And note that back issues of Megadisc also have numerous
  tutorials along these lines, not to mention MegaDos, a complete AmigaDos
  manual on a disk written by your faithful editor (for WB1.3 or lower).


[32m   <> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <>
[0m

[33mINTRODUCTION
[0m
   There are many Amigans who tune out whenever they hear CLI mentioned. I
  used to be an industrial mathematician and saw many academically qualified
  people react similarly whenever I said something like "Let x = the number
  you first thought of!".

   There is no need to be afraid; often it is the writer of tutorials like
  this one who is to blame for the reader's attitude. Do not despair! If
  you can run programs on the Amiga, you can learn to use CLI.

   With the development of efficient directory utilities like Directory Opus,
  Diskmaster 2, SID, DirWork and EasyAccess, the need for a comprehensive
  knowledge of CLI has declined; there is no longer a need to know how to use
  CLI to copy, create a directory, list a directory or file and so on.
  Strictly speaking CLI is still essential but only for the developer who
  does the hard work for you.

   However, if you want to use directory utilities and other interface
  related programs (like CustomKeys and AutoCLI) to the best advantage by
  specifying the configuration that you want, you need to know a little bit
  about CLI. It is this little bit that I hope to explain to you here.


[33mWHAT YOU NEED TO KNOW
[0m
   If nothing else, you need to know how to get a program running, using CLI
  rather than Workbench. This means you need to know what a path is and how
  to use this knowledge within the halls of CLI.


[33mTHE FOUR D'S
[0m
   Before you can understand what a path is, you need to know the elements of
  a PATH.

   The four D's are devices, drives, drawers and directories and it is these,
  together with files (data and programs), that go to make up a path.

   Devices and drives are related; a disk drive is an example of a device.
  It is conventional to place a colon immediately after a device name and so,
  if you see a name followed by a colon, it is probably a device of some kind
  and can be treated in the same way as a drive like df0: dh0: and
  Workbench:.  To avoid confusion at this stage, let us consider only drives.

   Also, although it is not strictly true, let us assume that drawers and
  directories are the same thing so that all we have to concern ourselves
  with are drives, directories and files.


[33mPATHS
[0m
   In a way you already know about paths if you've been able to run anything
  at all on your machine. You know how to run a program under Workbench -
  double click on an icon which opens a window, double click on another icon
  which opens another window, etc., until you finally double click on the
  icon for the program you want.

   What you are really doing is working logically from the general to the
  particular. Usually, you tell your Amiga which disk has the program or
  data file you want by clicking on the icon which represents this disk. The
  computer notes the name of the disk, the name which is displayed under the
  icon, and it responds by opening a window which shows the directories
  (drawers) that are present on the selected disk and, also, any files that
  are stored on a disk but not within a directory. If the program is in one
  of the directories showing, you click on the icon for that directory and
  continue the process until, finally, you find what you want.

   In the above you are tracing a path from a disk through directories to a
  file.

   The procedure that you will use in CLI to specify the file that you want
  is analogous to that which you have been following using Workbench.


[33mEXERCISE
[0m
   Consider any program that you run regularly from Workbench. Arm yourself
  with a pen and pad and go through the procedure that you use to get this
  program running, starting from scratch, i.e., from booting up your Amiga.
  While doing this, note down, in order on a line, the names that are shown
  beneath each icon selected.  For example, if the program DP3 is held in the
  DPaint drawer of the disk labelled Paint, you would have this:

                Paint  DPaint  DP3

   All you need do now, to create a CLI command to run DP3, is to punctuate
  this line. Place a colon (:) between the disk name and the first drawer,
  separate the items that follow using a slash sign (/) and, finally,
  eliminate all gaps. In the above example, you would finish up with the
  following command:

                Paint:DPaint/DP3

   This is the CLI command that you want.

   To take another example, the list:

                Workbench  Words  WPS  FinalCopyII

  would become:

                Workbench:Words/WPS/FinalCopyII

   If you use a directory utility, the complete path is usually shown in a
  string gadget above or below the directory/file display area.


[33mTHE BIG TEST
[0m
   Somewhere in the window of the disk you used to boot up, or of Workbench
  if you have a hard drive, you will see an icon labelled Shell or CLI.
  Double click on this to open a window which has the cursor, sitting in
  position by a prompt like "5.Workbench: >", active and ready to accept your
  input. All you have to do is to type in the command you came up with on
  your pad and then press <RETURN> and, if you've made no typing errors, you
  should see your program start to run.


[33mFILE NAME ARGUMENTS
[0m
   Many productivity programs allow you to specify in a CLI command the name
  of a file you want the program to access, e.g., most word processors let
  you specify the name of a text file that you have previously saved; most
  paint programs let you specify an image file.

   In such cases your CLI command can have a path for this file after the
  program's path, the two paths being separated by at least one space. You
  specify the path as you would for a program. Refer to the program manual
  to see what sort of arguments are permitted.

   As an example, you might have:

    df0:Words/ProWrite  df1:Letters/Mdisc.120393

   Here you are asking the program ProWrite to load a text file MDisc.120393.


[33mFOLLOW UP
[0m
   If you would like more of this sort of thing, let me know!


                                                George Knight
                                                1 Audie Pde
                                                Berkeley Vale 2259



[32m   <> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <>
[0m

