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

📄 sh1.sh

📁 几个linux试验的脚本编程
💻 SH
字号:
#!/bin/bashloop=1username="123"passwd="123"while [ $loop -lt 4 ]doecho -e "Please input username:\c"read user1echo -e "Please input password:\c"read pass1if [ $username = $user1 -a  $passwd = $pass1 ]thenbreakelif [ $loop -eq 3 ]thenexit 1fiecho "ERROR!"((loop=$loop+1))doneecho "Wlcome to this system!"echo "users=`who | wc -l`"echo -e "the list of user:\n`who`"sleep 2echo "user home:$HOME"who am iif [ -f dlxxlog.log ]thenecho "$HOME | `who am i`">>dlxxlog.logelseecho "$HOME | `who am i`">dlxxlog.logfiecho -e "Please input directory name:\c"read dnameif [ -d $dname ]thenecho "$dname already exist!"elsemkdir $dnamefimv dlxxlog.log "./${dname}"

⌨️ 快捷键说明

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