Example Scripts

These sections contain some examples of Bourne shell scripts.

Anonymous ftp Script

A script named fez performs an anonymous ftp get or list. Refer to the Description comments in the script for information about how the FTP site is determined.

 #!/bin/sh # # @(#)fez,v1.0 (me@anywhere.EBay.Sun.COM) 08/29/92 # PATHNAME=anywhere.EBay:/home/me/bin/fez MYNAME=`basename $0` # # Author: # Wayne Thompson # # Synopsis: usage=`/bin/sed -e "s/^ *//" << endusage usage: $MYNAME [-h] [-abfglmprR] [[login@]hostname:[sourcepath]] endusage` # # Description: # This script will perform an anonymous ftp get or list. # # If the hostname is not specified on the command line, then # it is derived from the basename(1) of the current directory. # This ...

Get Solaris™ 8 Advanced System Administrator's Guide, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.