: Bourne shell script ########################################################################## ## ## ## Load a selected set of kermit versions from Columbia host CU20B ## ## ## ## Original version: 10/17/84 ## ## Rand S. Huntzinger, National Library of Medicine, Bethesda, Md ## ## Author's Internet address: randy@nlm-vax ## ## ## ########################################################################## ## ## ## Usage: getkermit [-v] Kermit-prefix ... ## ## ## ## where: -v selects verbose mode (optional). ## ## ## ## Kermit-prefix is one of the Kermit version prefixes ## ## used by Columbia to differentiate the different ## ## versions of Kermit. ## ## ## ## Examples: ## ## ## ## 1. getkermit rt r11 ## ## ## ## This command loads the two RT-11 versions of Kermit ## ## from CU20B with no feedback to the user's terminal ## ## except for the startup header. ## ## ## ## 2. getkermit -v '' >& log & ## ## ## ## This one loads all versions of Kermit (a null prefix). ## ## There is verbose feedback, which the user is directing ## ## to the file log. The job is in the background. This ## ## is the way I like to run it, since I can look at the ## ## log to see how the job is progressing. ## ## ## ########################################################################## cmd=/tmp/getkermit.$$ # Temporary file name verbose="" # By default, not verbose me=`echo $0 | sed 's;.*/;;'` # My name echo "" echo "Load selected Kermit versions from Columbia University" echo "" # Test for the optional leading -v (verbose) option if test x$1 = x-v then # -v flag marks verbose echo "(verbose option on)" verbose="-v" shift fi # Initialize the ftp control file by writing in the initial commands cat > $cmd <> $cmd <> $cmd <]*.\([^.]*.[^.]*\).*;../\1;' ` if test x$verbose = x-v then echo Renaming \"$x\" to \"$y\". fi mv $x $y done # Finally, we can clean up by deleting the temporary directory rm -rf $temp if test x$verbose = x-v then echo $me job completed. fi