喜悦国际村 
» 游客:  注册 | 登录 | 搜索 | 统计 | 喜悦证交所 | 帮助

RSS 订阅当前论坛  

[北京]代朋友公司招聘PHP高级程序员多名

上一主题 下一主题
     
标题: [问题] 帮我看看这个shell脚本有什么问题  
 
thankcup (thankcup)
注册会员
Rank: 2
初级会员



UID 26979
精华 0
积分 76
帖子 69
金钱 76 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2004-3-16
状态 离线
帮我看看这个shell脚本有什么问题

!/bin/sh
# ifmkdir
# parameter is passed as $1 but reassigned to DIRECTORY
DIRECTORY=$1
# is the string empty ?
if [ "$DIRECTORY" = "" ];
then
echo "Usage:`basename $0` directory to create" >&2
exit 1
fi
if [ -d $DIRECTORY ];
then:
else
echo "The directory does not exist"
echo -n "Create it now ? [y..n]:"
read ANS
if [ "$ANS" = "y" ] || [ "$ANS" = "Y" ]
then
echo "creating now"
mkdir $DIRECTORY >/dev/null 2>&1
if [ $? != 0 ]; then
echo "Errors creating the directory $DIRECTORY" >&2
exit 1
fi
else:
fi
fi
2007-6-6 08:47 PM#1
查看资料  发短消息  顶部
     


  可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题 | 开通个人空间  


 




Powered by Discuz! 6.1.0  © 2001-2010 Comsenz Inc.
Processed in 0.027507 second(s), 6 queries

(冀ICP备05009913号) 管理员:sadly 邮箱/MSN: sadly@phpx.com QQ:824008(长隐) 清除 Cookies - - Archiver - WAP