Linux under Dialog+shell Three-layer Directory Professional specification springboard machine script

Source: Internet
Author: User

#Dialog +shell Introduction

Dialog+shell combined use, square can reflect the effect of Dialog graphics, in the operation of the time, the use of graphical interface, you can give you a more intuitive feeling, I believe you will like his 650) this.width=650; "src="/http Img.baidu.com/hi/face/i_f05.gif "alt=" I_f05.gif "/>



#创建脚本目录

[[email protected] ~]# mkdir-p/scripts/tiaoban/{qqandroid,qqios,qqwxandroid,wxios,menu_list}


#禁止普通用户登陆

[[email protected] ~]# cat/etc/profile.d/tiaoban.sh[$UID-ne 0] && sh/scripts/tiaoban/tiaoban.sh


#脚本目录结构

[Email protected] tiaoban]# Tree/scripts/tiaoban//scripts/tiaoban/├──menu_list│├──one_menu│└──one_option├──qqa Ndroid│├──three_directory││├──ip.txt││├──three_1_100_tiaoban.sh││├──three_menu││└──three_o  PTION│├──TOW_MENU│├──TOW_OPTION│└──TOW_TIAOBAN.SH├──QQIOS├──QQWXANDROID├──TIAOBAN.SH└──WXIOS6 directories, Ten files


#第一层目录脚本

[[email protected] tiaoban]# cat tiaoban.sh #!/bin/bashwhile :d Ostty susp  ^@#$   #屏蔽Crtl  +zstty intr ^@$#   #屏蔽Ctrl  +cstty quit ^* #$   #屏蔽Ctrl  +llj= ' dirname $0 '  dialog --title  ' menu '  --no-cancel - -menu  "Level directory"  12 35 5  ' cat  $LJ/menu_list/one_menu '  2>   $LJ/menu_list/one_option select= ' cat  $LJ/menu_list/one_option ' if [  "$SELECT"  ==  1 ];then        sh  $LJ/qqandroid/tow_tiaoban.shelif  [  "$SELECT"  == 2 ];then        sh  $LJ/ qqios/tow_tiaoban.shelif [  "$SELECT"  == 3 ];then         sh  $LJ/wxandroid/tow_tiaoban.shelse        sh $ Lj/wxios/tow_tiaoban.sHfidone 


#第一层目录菜单

[[email protected] tiaoban]# Cat/scripts/tiaoban/menu_list/one_menu 1 qqandroid 2 Qqios (function not developed) 3 wxandroid (function not developed) 4 Wxios (function not developed)


#第二层目录脚本

[Email protected] tiaoban]# cat/scripts/tiaoban/qqandroid/tow_tiaoban.sh #!/bin/bashwhile:d olj= ' dirname $ ' dialog-  -title "Menu"--menu "secondary Directory" "Cat $LJ/tow_menu ' 2> $LJ/tow_optionselect= ' cat $LJ/tow_option ' if [ "$SELECT" = = 1];then sh $LJ/three_directory/three_1_100_tiaoban.shelif ["$SELECT" = = 2];then sh $LJ/thre E_directory/three_101_200_tiaoban.shelif ["$SELECT"-eq 3];then sh $LJ/three_directory/three_201_300_tiaoban.shel Se sh/scripts/tiaoban/tiaoban.shfidone


#第二层目录菜单

[[email protected] tiaoban]# Cat/scripts/tiaoban/qqandroid/tow_menu 1 qqandroid1-100 service 2 qqandroid101-200 (function not developed) 3 qqandroid201-300 Clothing (function not developed) 4 back to the top level


#第三层目录脚本

[[email protected] tiaoban]# cat /scripts/tiaoban/qqandroid/three_directory/three_1_100_ tiaoban.sh #!/bin/bashwhile :d olj= ' dirname $0 ' dialog --title  "menu"  --menu  "Three directory"  13 35 15  ' cat  $LJ/three_menu '  2>  $LJ/three_ optionselect= ' cat  $LJ/three_option ' Function connect ()  {         yh= ' id '         user= ' echo  $yh  | awk -f " "   ' {print $2} '  | awk -f "gid="   ' {print $2} '  | awk -f "( "  ' {print $2} '  | awk -f") "  ' {print $1} '          ip= ' head -$SELECT   $LJ/ip.txt | tail -1 '          ssh -p 22 [email protected] $ip}if [  "$SELECT"  ==  1 ];then        connectelif [  "$SELECT"  == 2 ];then         connectelif [  "$SELECT"  == 3 ];then         connectelif [  "$SELECT"  == 4 ];then         connect elif [  "$SELECT"  == 5 ];then         sh /scripts/tiaoban/qqandroid/tow_tiaoban.shelse         sh /scripts/tiaoban/tiaoban.shfidone


Third-level Catalog menu

[[email protected] tiaoban]# Cat/scripts/tiaoban/qqandroid/three_directory/three_menu 1 qq1 service 2 Qqandroid2 (function not developed) 3 QQANDROID3 Clothing (function not developed) 4 qqandroid ... Service (function not developed) 5 return to the previous level 6 back to home


#IP文件展示

[Email protected] tiaoban]# Cat/scripts/tiaoban/qqandroid/three_directory/ip.txt 192.168.1.103192.168.1.104192.168.1.105192.168.1.106192.168.1.107192.168.1.108192.168.1.109192.168.1.110192.168.1.111192.1 68.1.112


#执行效果展示

1) Normal User Login

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/83/4C/wKioL1dv9gqwB93NAAB_nL-6Bj8780.png-wh_500x0-wm_3 -wmp_4-s_1329127153.png "title=" qq picture 20160626233556.png "alt=" Wkiol1dv9gqwb93naab_nl-6bj8780.png-wh_50 "/>


2) First Level menu bar

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/83/4C/wKioL1dv96fTlR_fAAAmhyg6ASY618.png-wh_500x0-wm_3 -wmp_4-s_1663665966.png "style=" Float:none; "title=" 1.png "alt=" Wkiol1dv96ftlr_faaamhyg6asy618.png-wh_50 "/>


3) Second Level menu bar

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/83/4D/wKiom1dv96igyIJFAAAuqAdGSDM157.png-wh_500x0-wm_3 -wmp_4-s_898318015.png "style=" Float:none; "title=" 2.png "alt=" Wkiom1dv96igyijfaaauqadgsdm157.png-wh_50 "/>


4) Third Level menu bar

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/83/4C/wKioL1dv96jxpjeDAAAxh6PYuQ0922.png-wh_500x0-wm_3 -wmp_4-s_91915320.png "style=" Float:none; "title=" 3.png "alt=" Wkiol1dv96jxpjedaaaxh6pyuq0922.png-wh_50 "/>


5) successful landing show

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/83/4D/wKiom1dv96nztLh-AABKCGOyj3M281.png-wh_500x0-wm_3 -wmp_4-s_3694823710.png "style=" Float:none; "title=" 4.png "alt=" Wkiom1dv96nztlh-aabkcgoyj3m281.png-wh_50 "/>


Tip: In the use of ordinary users landing board machine to connect back-end server, ordinary users press Crtl+c and CTRL + Z is not effective, so ordinary users can only directly connected to the backend server and not directly to the Springboard machine terminal


This article is from the "Wsyht blog" blog, make sure to keep this source http://wsyht2015.blog.51cto.com/9014030/1793101

Linux under Dialog+shell Three-layer Directory Professional specification springboard machine script

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.