linux操作系统习题(求答案)
试编写一个脚本,显示下边的菜单:1.Displaylistofallusercurrentlyloggedin2.GethelponaparticularcommandP...
试编写一个脚本,显示下边的菜单:
1.Display list of all user currently logged in
2.Get help on a particular command
Press<Ctrl+D>to exit
如果选择2,脚本要接受一个命令名作为输入数据.如果没有数据输入,脚本要显示错误并推出,否则,脚本调用手册并把命令名作为参数传递过去. 展开
1.Display list of all user currently logged in
2.Get help on a particular command
Press<Ctrl+D>to exit
如果选择2,脚本要接受一个命令名作为输入数据.如果没有数据输入,脚本要显示错误并推出,否则,脚本调用手册并把命令名作为参数传递过去. 展开
2009-12-13
展开全部
echo "1:display all the users login currently"
echo "2:get help on a particular command"
echo "please you choose a num"
read num
if test $num -eq 2
then
echo "please input the command that you want to know about"
read chr
fi
case $num in
1) who;;
2) man $chr;;
esac
echo "2:get help on a particular command"
echo "please you choose a num"
read num
if test $num -eq 2
then
echo "please input the command that you want to know about"
read chr
fi
case $num in
1) who;;
2) man $chr;;
esac
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |