⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uuenc

📁 UNIX下SH的实现源码
💻
字号:
#! /bin/bash## original from:# @(#) uuenc.ksh 1.0 93/09/18# 93/09/18 john h. dubois iii (john@armory.com)## conversion to bash v2 syntax by Chet Rameyistrue(){	test 0 -ne "$1"}isfalse(){	test 0 -eq "$1"}phelp(){echo "$name: uuencode files.$UsageFor each filename given, $name uuencodes the file, using the finalcomponent of the file's path as the stored filename in the uuencodedarchive and, with a .${SUF} appended, as the name to store the archive in.Example: $name /tmp/fooThe file /tmp/foo is uuencoded, with \"foo\" stored as the name to uudecodethe file into, and the output is stored in a file in the current directorywith the name \"foo.${SUF}\".Options:-f: Normally, if the file the output would be stored in already exists,    it is not overwritten and an error message is printed.  If -f (force)    is given, it is silently overwritten.-h: Print this help."}name=${0##*/}Usage="Usage: $name [-hf] <filename> ..."typeset -i force=0SUF=uuwhile getopts :hf opt; do    case $opt in    h)	phelp; exit 0;;    f)	force=1;;    +?)	echo "$name: options should not be preceded by a '+'." 1>&2 ; exit 2;;    ?)	echo "$name: $OPTARG: bad option.  Use -h for help." 1>&2 ; exit 2;;    esacdone # remove args that were optionsshift $((OPTIND - 1))if [ $# -lt 1 ]; then    echo "$Usage\nUse -h for help." 1>&2    exitfifor file; do    tail=${file##*/}    out="$tail.${SUF}"    if isfalse $force && [ -a "$out" ]; then	echo "$name: $out: file exists.  Use -f to overwrite." 1>&2    else	uuencode $file $tail > $out    fidone

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -