#!/bin/bash
function strealingManu
{
pwdfolder=`pwd`
for var in "$@"
do
man 1 $var > $pwdfolder/$0_Folder/${var}_offical_usage.txt
done
}
function strealK
{
str1="$1"
str2="clean"
if [ $str1 = $str2 ]
then
rm -rf $0_Folder
else
strealingManu "$@"
fi
}
if [ -d $0_Folder ]
then
strealK "$@"
else
mkdir $0_Folder
strealK "$@"
fi
注释
把man命令查看的函数手册偷到本地的文件夹看