Shell Script Collation

Source: Internet
Author: User

Create the user who wrote the file

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/98/E0/wKiom1lBR5_gYB4HAAAoKuZARYU671.png "title=" Screenshot from 2017-06-13 19-44-27.png "alt=" Wkiom1lbr5_gyb4haaaokuzaryu671.png "/>

Second, ping 172.25.254. {1..10} host, if the ping general can be turned on on behalf of the host, Ping does not represent the host shutdown

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/98/DF/wKioL1lBSE6xVQ3tAABVioICluw189.png "title=" Screenshot from 2017-06-13 19-42-54.png "alt=" Wkiol1lbse6xvq3taabvioicluw189.png "/>

Third, create a directory, the name of the directory with the time of establishment, the/etc/directory in the. conf files are copied to the directory

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/98/E0/wKiom1lBSJahtxKYAABJYQTfBAk257.png "title=" Screenshot from 2017-06-13 19-46-33.png "alt=" Wkiom1lbsjahtxkyaabjyqtfbak257.png "/>

Four, countdown 5 seconds script

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/98/E0/wKiom1lBSXrwnn7dAABBtZbcB4o063.png "title=" Screenshot from 2017-06-13 19-51-44.png "alt=" Wkiom1lbsxrwnn7daabbtzbcb4o063.png "/>

Five, Countdown 1 minutes 10 seconds, Countdown end immediately exit the script

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/98/E0/wKiom1lBSZ2BEh9WAAC5mYOcLAw934.png "title=" Screenshot from 2017-06-13 19-57-33.png "alt=" Wkiom1lbsz2beh9waac5myoclaw934.png "/>

Six, back up the database, the file is stored in/mnt/db_back, the name of the backup plus the established time

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/98/E0/wKioL1lBSiWx4XuGAADXNUZzciQ599.png "title=" Screenshot from 2017-06-13 20-49-13.png "alt=" Wkiol1lbsiwx4xugaadxnuzzciq599.png "/> Seven, finding files when the output is exist when the file exists is not exist

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/98/E0/wKioL1lBSm-BciABAAA2-CrITYE371.png "title=" Screenshot from 2017-06-13 20-51-40.png "alt=" Wkiol1lbsm-bciabaaa2-critye371.png "/>

Eight, *) Script.sh/mnt/userfile/mnt/passfile

*) do nothing if the user you want to establish already exists

*) The number of files specified after a script is less than two output

"Please give me userfile or passwd file"

*) When the number of rows in the given file is inconsistent

/mnt/userfile ' s line is Different/mnt/passfile's line

########## #改脚本为测试脚本, the user password cannot be established when the user is established ##########


650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M01/98/E0/wKioL1lBS2Djr6TgAADI-CaA9yg142.png "title=" Screenshot from 2017-06-14 20-33-32.png "alt=" Wkiol1lbs2djr6tgaadi-caa9yg142.png "/>

Shell Script Collation

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.