Shell script Programming-case OneProgramming Requirements:1. Create a Vm-ctl script, under/bin/2. Implement features: Create a virtual machine, create a virtual machine snapshot, turn on a virtual machine, display a virtual machine, stop a virtual
Shell if-B Returns True when file exists and is a block file-C Returns True when file exists and is a character-D returns True when pathname exists and is a directory-E Returns True when a file or directory specified by pathname is present-F Returns
I. Traditional deployment methods and advantages and disadvantages1. Traditional deployment methods(1) purely manual SCP(2) manual login git pull, svn update(3) Pure handmade xftp pull up(4) develop to hit a compressed package, RZ up; unzip2.
Shell script Programming "on"A program is a combination of instructions and data.Program Programming Style:Program: command-centric, data-serving instructionImage: Data-centric, command-serving dataProgramming Languages:Low Level:
1. What is the difference between sed and awk?(1) Awk: Operations by column (domain); sed: line by row(2) awk: Text processing language, suitable for extracting text; SED: non-interactive editor for editing text2. Which parameter does awk use as a
There are two types of Linux users in the world: adventurous and cautious.One type of user is always instinctively trying any new choice that can poke its pain points. They have tried countless window managers, system distributions, and almost all
Transferred from: http://www.cnblogs.com/fhefh/archive/2011/04/15/2017613.htmlThe meaning of shell variable $#,[email protected],$0,$1,$2 in Linux is explained:Variable Description:$$The PID of the shell itself (ProcessID)$!PID of the Shell's last
Enter rescue mode: 1 Enter BIOS Select USB drive to start and save exitSelect rescue ModeDescription system mounted to/mnt/sysimage on continue continueSelect ShellSwitch root to the root file system and see if there is a U disk vfst is the U disk
The role of Eval is to perform command-line processing again, that is, to perform two command-line processing on a single command line.1. Example 1: Using the eval technique to implement the shell's control structure forUse the Eval technique to
What is a shell script?A shell script is a text file that contains one or more commands.As a system administrator, we often need to use multiple commands to accomplish a task, and we can add these commands in a text file (shell script) to accomplish
#!/bin/Shmaxrstcount=5; Proctogo=/mnt/hgfs/code/test/Show#count isThe counter of test started Timescount=0Sys_reboot () {echo"system is going to reboot"; Reboot;} Main_loop () { while : Do######################################### prostillrunning=
Testing and judging of shell scripts1. TestingGrammar:[operator condition] = = Test operator condition1) test file-level directoryType of File:F, FileLs-l # #只查看字段的第一个字符, file "-"D, CatalogueLs-ldL, Link fileLs-lC, character deviceLs-l/dev/ttyB,
1.Encryption Tools1.1 Gzexe1.1.1DescriptionGzexe is the program used to compress execution files. When you go to execute a compressed execution file, the file is automatically decompressed and then continues to execute, using the same generic
For details see: http://stackoverflow.com/questions/11160363/execute-shell-script-after-post-build-in-jenkinsOn a Linux server, when the build is complete, you need to manipulate the content, the files, and if you can use shell commands to execute
One, single and double quotation marksFirst, both single and double quotes are meant to solve the problem of having spaces in the middle.The space is used as a typical delimiter in Linux, such as String1=this is a string, so execution will be an
User InformationThe first thing you should do when you install Git is to set up your user name and email address. This is important because each Git commit will use this information and it will be written to each of your commits and cannot be
The next section continues,1. Reading input from the keyboard#!/bin/bashread-p ' Please input something: ' Inputecho ' your input: ' $inputOperating effect:./read1.shplease Input Something:123your input:1232. While Loop and Case
1. Find the same number in two filesDiff-y Xx.txt Oo.txt | Egrep-v "" | awk ' {print $} '2. Print the first few lines to the first lineCat 1 | awk ' Nr==2,nr==4{print} '1. Remove the Linux remote user connection session[Email protected] logs]# W 10:4
2016-08-18Content of the lesson:Shell Programming Basics (select loops and menus, functions)Yum Management, custom Yum WarehouseSelect loops and MenusSelect variable in listDoCircular Body CommandDone1. The Select loop is used primarily to create
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.