Icon The Kermit Project   |   Now hosted by Panix.com
New York City USA   •   kermit@kermitproject.org
…since 1981

Getkermitscript

[download

    A Kermit script to download and install Kermit scripts

Author:  Frank da Cruz
Script version: 1.00
Dated: 2014/01/12
      Platform:  Any version of Unix where C-Kermit is available.
Requires:  C-Kermit 8.0.201 or later*
This page last updated: Sun Jan 12 16:02:17 2014

Getkermitscript is a program written in the Kermit script language that downloads a script from the Kermit Project script library and configures it for and installs it on your computer. As coded it runs only in Unix, but with minor adjustments probably will also run on VMS and even Windows.
____________________
*   8.0.206 or later recommended because the file-transfer display is cleaner.

Installation

  1. CLICK HERE to download. Save it on your computer in a directory that is in your PATH, so you can execute it just by typing its name, no matter what your current directory is.

  2. Give it execute permission:

    chmod +x getkermitscript

  3. Using a text editor, replace the top line of the getkermitscript file with the full pathname of C-Kermit on your computer, with "#!" as a prefix and " +" as a suffix (space and plus-sign), with no spaces on the line except the one space before the plus sign (explain). Example:

    #!/usr/local/bin/kermit +

    (Note: you don't actually have to replace the top line, you can also simply put the new one above it.) This step is somewhat annoying but it's necessary for all scripts of any kind in Unix. The nice thing is that once you have completed this step for Getkermitscript, then Getkermitscript will perform it for you automatically on any other Kermit scripts that you download with it.

Using Getkermitscript

To download any script from the Kermit script library, type the name of this script ("getkermitscript" unless you changed it) followed by the name of the script to get, for example:
getkermitscript jpginfo
and optionally followed by the name of the directory to store it in:
getkermitscript jpginfo scripts
(which should normally be in your PATH). If you omit the target directory name, the script is stored in your current directory.

After the desired script file is downloaded, an appropriate top line is added to it automatically and it is given execute permission, so you should be able to run the downloaded script immediately, just by typing its name (assuming you have stored it in a directory that is in your PATH).

Note that all scripts in the Kermit script directory have lowercase ASCII names, and that they do NOT have a .ksc extension, because if they did, any attempt to download them to Windows would result in having Windows tell the local Kermit program to execute them. These points can be confusing because in documentation the script names are sometimes capitalized and/or shown with .ksc extensions. Getkermitscript allows for these possibilities by automatically lowercasing the script name you give it and removing any .ksc extension.

Let's suppose you have downloaded Getermitscript and you want to use it to download some of the more popular Kermit scripts, and let's say you keep your scripts in the scripts subdirectory of your login directory:

cd ~/scripts CD to your scripts directory
getkermitscript photogallery
Get and install the Photogallery script.
getkermitscript jpginfo Get and install the jpginfo script.
getkermitscript getkermitscript Get and install a new version of the getkermitscript script.

CLICK HERE for the current list of scripts available to download.

Getkermitscript / The Kermit Project / kermit@kermitproject.org / January 2014