January 2001
Intermediate to advanced
480 pages
7h 22m
English
Here is an interactive version of the uucp command. Instead of looking for a system name in the uucp systems file using grep, the remote system name is verified by using file I/O substitution and Korn shell patterns.
#!/bin/ksh # # kuucp - Korn shell interactive uucp # # Check usage if (($# > 0)) then print "Usage: $0" exit 1 fi # Set variables PUBDIR=${PUBDIR:-/usr/spool/uucpublic} # This sets UUSYS to the contents of the HDB-UUCP # Systems file. It may be different on your system. UUSYS=$(</usr/lib/uucp/Systems) # Get source file read SOURCE?"Enter source file: " # Check source file if [[ ! -f $SOURCE ]] then print "$SOURCE: non-existent or not accessible" exit 2 fi # Get remote system name read RSYS?"Enter remote ...
Read now
Unlock full access