4 # @(#) uuenc.ksh 1.0 93/09/18
5 # 93/09/18 john h. dubois iii (john@armory.com)
7 # conversion to bash v2 syntax by Chet Ramey
21 echo "$name: uuencode files.
23 For each filename given, $name uuencodes the file, using the final
24 component of the file's path as the stored filename in the uuencoded
25 archive and, with a .${SUF} appended, as the name to store the archive in.
28 The file /tmp/foo is uuencoded, with \"foo\" stored as the name to uudecode
29 the file into, and the output is stored in a file in the current directory
30 with the name \"foo.${SUF}\".
32 -f: Normally, if the file the output would be stored in already exists,
33 it is not overwritten and an error message is printed. If -f (force)
34 is given, it is silently overwritten.
39 Usage
="Usage: $name [-hf] <filename> ..."
44 while getopts :hf opt
; do
48 +?
) echo "$name: options should not be preceded by a '+'." 1>&2 ; exit 2;;
49 ?
) echo "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
53 # remove args that were options
57 echo "$Usage\nUse -h for help." 1>&2
64 if isfalse
$force && [ -a "$out" ]; then
65 echo "$name: $out: file exists. Use -f to overwrite." 1>&2
67 uuencode $file $tail > $out