best shell scripting book

Want to know best shell scripting book? we have a huge selection of best shell scripting book information on alibabacloud.com

Shell Scripting Learning 20 shell until loop

The Until loop executes a series of commands until the condition is true. The Until loop and the while loop are just the opposite of the processing mode. The general while loop is better than the until loop, but at some point it is only rare that the until loop is more useful.The Until loop format is:Until Commanddo Statement (s) to being executed until command is TruedoneThe command is usually a conditional expression, and if the return value is false, the statement in the loop body continues

Shell scripting: Implementing Linux User management and monitoring through the shell

$name >/dev/nullif [$?-eq0];thenstr= "user${name}isdeletesuccessfully!!!" echo-e "\033[30;47m$str\033[0m" elsestr= "user${name}isdeletefailly!!!" echo-e "\033[31;47m$str\033[0m" fi ;; 5) str= ' df-th ' echo-e "\033[30;47m$str\033[0m";; 6) str= ' free -m ' echo-e "\033[30;47m$str\033[0m" ;; 7) clearmenu;; 8) echo-e "\e[31mlogout...\e[0m" sleep1break;; NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;9) echo-e "\e[31mquitsuccessfully!!! \e[0m " exit;; *) str= "I

"Linux command line and Shell Scripting Encyclopedia" learning notes

First part: Linux command line"Linux command line and Shell Scripting Encyclopedia" chapter I: the first knowledge of Linux shell"Linux command line and Shell Scripting Encyclopedia" chapter II: Into the shell"Linux command line a

Shell Scripting Learning 21 shell break and Continue commands

2 3 Do For var2 in 0 5 Do if [ $var 1 -eq 2-a $var 2 -eq 0 ] /c0> Then break 2 Else Echo "$var 1 $var 2" fi Done Done As above, break 2 means to jump out of the outer loop directly. Operation Result:1 01 5Continue commandThe continue command is similar to the break command, with only a little difference, and it does not jump out of all loops and just jumps out of the current loop.To modify the above example: #!/bin/bash While : Do echo- n "Input a num

Shell Scripting Learning Two: arithmetic operations in the shell

] ~]# Expr 2 * 3expr:syntax errorSecond, let command[[email protected] ~]# let A=2+3[[email protected] ~]# echo $a 5[[email protected] ~]# let A=2-3[[email protected] ~]# Echo $a -1[[email protected] ~]# let A=2*3[[email protected] ~]# echo $a 6[[email protected] ~]# let A=2/3[[email protected] ~]# echo $a 0[[email protected] ~]# b=4[[email protected] ~]# c=2[[email protected] ~]# let a= $b/$c [[email protected] ~]# Echo $a 2When using let, it is generally necessary to assign them to a variable

Shell script (i) Shell scripting basics using shell variables

% $Y 3 · [Email protected] ~]# ycube=expr $Y \* $Y \* $Y [Email protected] ~]# echo $Ycube 4096 · ################### #Position variable #################### represented as $n, n is a number between 1~9 · [Email protected]/]# VI add.sh #!/bin/bash sum=expr $1 + $2 echo "$ + $ = $SUM" · [Email protected] ~]# chmod +x add.sh · [Email protected]/]#./add.sh 12 34 12 + 34 = 46 · ################### #Predefined variable #################### $#: Number of positional variables in the command line $: The

"Linux command line and Shell Scripting Encyclopedia" chapter 17th Create a function

Tags: Ash programming Daquan status Session $ home Directory str ReferenceYou can encapsulate the shell script code in a function so that it can be used more than once anywhere in the script.17.1 Basic Scripting functionsFunction: is a block of script code that can be named and reused anywhere in the code.17.1.1 Creating a functionThere are two types of formats: Name is the function name1)Function name{Comm

Shell scripting 30 minutes to get started

What is a shell script Shell scripting (English: Shell script), also known as shell Command Draft, programmatic script, is a computer program and text file, the contents of a series of shell commands, through the Unix

Shell scripting 30 minutes to get started

What is a shell script sample Let's look at an example: #!/bin/sh cd ~ mkdir shell_tut cd shell_tut for ((i=0; i Example explanation Line 1th: Specify the script interpreter, here is the interpreter with/bin/sh Line 2nd: Switch to the current user's home directory Line 3rd: Create a directory Shell_tut Line 4th: Switch to the Shell_tut directory Line 5th: Cycle conditions, 10 cycles

The old boy new book Shell programming actual combat scheduled to begin-Package parcel answer

operational experience summary, a comprehensive and systematic explanation of operations in the Shell programming required knowledge points and shell programming of various enterprise-class case, not only to explain the shell programming involved in the various core technology points, Also use shell programming for th

Shell Scripting Learning Guide [IV] (Arnold Robbins & Nelson h.f. Beebe) _linux Shell

zero-based and 1970/1/1/00:00:00 UTC. The temporary file/tmp is then introduced in a section. In general, to solve the temporary files generated by their own programs, the shared directory or multiple instances of the same program may cause temporary file naming conflicts, typically using the process ID, can be in the shell variable Copy Code code as follows: Umask 077 #??????????????? Tmpfile=${tmpdir-/tmp}/myprog. "/>you can ' t

Linux Shell Scripting first experience _linux shell

Often, when people refer to the "Shell scripting language", they are bash,ksh,sh or other similar Linux/unix scripting languages emerging in their minds. Scripting languages are another way to communicate with a computer. Users can move the mouse and click on a variety of objects, such as buttons, lists, marquee, and s

Use PHP as a Shell scripting language

Use PHP as the Shell scripting language, read the use of PHP as the Shell scripting language, -- English original: DarrellBrogdon, published in http://www.phpbuilder.com/columns/darrell20000319.php3) many may have thought about using PHP to write some program such as timed sending, but it is impossible to execute Darre

Using PHP as a Shell scripting language _ PHP Tutorial

Use PHP as the Shell scripting language. We all know that PHP is a very good dynamic web page development language (fast speed, short development cycle ......). However, only a few people realize that PHP can also be well written. we all know that PHP is a very good dynamic web page development language (fast speed, short development cycle ......). However, only a few people realize that PHP can also be a g

How to use PHP as the Shell scripting language

As we all know, PHP is a very good dynamic web development language (fast, short development cycle ...). )。 But only a very small number of people realize that PHP can also be very good as the language of writing shell scripts, when PHP as the language of writing shell scripts, he is not as powerful as Perl or bash, but he has a good advantage, Especially for those of me who are familiar with PHP but are no

How to use PHP as a shell scripting language

How to use PHP as the Shell scripting language Probably a lot of people have thought of using PHP to write some timing letters and other programs, but there is no way to execute PHP on a regular basis;As we all know, PHP is a very good dynamic web development language (fast, short development cycle ...). )。 But only a very small number of people realize that PHP can also be very good as the language of wr

How to use PHP as a shell scripting language

How to use PHP as the Shell scripting language Probably a lot of people have thought of using PHP to write some timing letters and other programs, but there is no way to execute PHP on a regular basis;As we all know, PHP is a very good dynamic web development language (fast, short development cycle ...). )。 But only a very small number of people realize that PHP can also be very good as the language of wr

The basics before you learn shell scripting

, in the shell script of the usual term loop.At this point, you press CTRL +z to pause it, and then enter BG to go back into the background.In the case of multitasking, if you want to move the task to the foreground, FG is followed by the task number and the task number can be obtained using the jobs command.9. >>, 2>, 2>> : The above-mentioned directional symbols > and >> denote the meaning of substitution and addition, then there are two symbols whi

"Linux command line and Shell Scripting Encyclopedia" chapter Sixth environment variables

to customize their command aliases and private script functions3. non-interactive shellThis is the shell used by the system to execute shell scripts.There is no command line prompt.Bash shell provides bash_env environment variables. When a non-interactive shell is started, bash_env is checked to see the startup file t

Using PHP as the Shell scripting language _php Tutorial

As we all know, PHP is a very good dynamic web development language (fast, short development cycle ...). )。 But only a very small number of people realize that PHP can also be very good as the language of writing shell scripts, when PHP as the language of writing shell scripts, he is not as powerful as Perl or bash, but he has a good advantage, Especially for those of me who are familiar with PHP but are no

Total Pages: 15 1 2 3 4 5 6 .... 15 Go to: Go

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.