再麻烦你一个问题,这一空填什么 final= cp( ){local finalif [ $# -eq 1 ] ; then ## Only one arg,command cp -b "$1" .## so copy it to the current directoryelsefinal= if [ -d "$final" ] ; then command cp -b "$@" ## copy all the files into it
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/18 17:32:47
再麻烦你一个问题,这一空填什么 final= cp( ){local finalif [ $# -eq 1 ] ; then ## Only one arg,command cp -b "$1" .## so copy it to the current directoryelsefinal= if [ -d "$final" ] ; then command cp -b "$@" ## copy all the files into it
再麻烦你一个问题,这一空填什么 final=
cp( )
{
local final
if [ $# -eq 1 ] ; then ## Only one arg,
command cp -b "$1" .## so copy it to the current directory
else
final=
if [ -d "$final" ] ; then
command cp -b "$@" ## copy all the files into it
else
command cp -b "$@" .## otherwise,copy to the current directory
fi
fi
}
再麻烦你一个问题,这一空填什么 final= cp( ){local finalif [ $# -eq 1 ] ; then ## Only one arg,command cp -b "$1" .## so copy it to the current directoryelsefinal= if [ -d "$final" ] ; then command cp -b "$@" ## copy all the files into it
final=`eval echo \\$$#`
将最后一个位置变量的值赋给它,如果最后一个位置变量为目录,则将前面所有的位置变量(文件)拷贝到最后的目录中.