Two very detailed shell instances
General programming steps
Now let's discuss the general steps to write a script. Any good script should have help and input parameters. and write a pseudo script (framework.sh) that contains the framework structure
The following is a 1-2-day study of Shell learning notes
————————-I'm the separator —————————
Hardware to perform, operating between the kernel and the hardware.
The command parser.
Component elements of a shell script
System
Linux Process Permissions Analysis
In Linux, about file permissions, most people contact more, but also more familiar with the understanding. But there is little knowledge of process permissions. This article summarizes the Linux system under the
A regular expression and wildcard characters
1 A regular expression is a string that matches the criteria in a file, and a positive one contains a match, and grep,awk,sed commands can support regular expressions
The 2 wildcard is used to match the
Objective
I believe a lot of people have had this experience, when modified a pile of bugs, to update the code to the server, at this point, the simplest way is to upload the project file all at once, this way feasible, but not to take. Why, you
It hasn't been updated in a long time.Think you should continue reading the script.
#14 Formatting Long Lines
#!/bin/sh
# A version of FMT, using Nroff. Adds Two useful flags:-W X for line width
# and-h to enable hyphenation for
When it comes to shell-controlled multithreading, most of the online sharing is a pipeline control scheme. This scheme, Zhanggo blog has also been actual combat and share once: "Shell+curl website health status check script, grabbed the Chinese blog
One, automatically padded: [Tab]
A lot of people should be able to do this by pressing the [TAB] key when entering commands, directories, or filenames. The system will help you fill in what you might want to enter, if more than one selection system
For Linux array definitions, and build methods, see: Linux shell dynamically generate array series SEQ usage tips. My main point here is to efficiently generate the list string, as well as the array method.
One, the SEQ method produces:
Binary comparison operator, comparing variables or comparing numbers. Note the difference between numbers and strings.
Integer Comparisons
-eq equals, such as: if ["$a"-eq "$b"]
-ne is not equal to, such as: if ["$a"-ne "$b"]
-GT is greater than,
*-B Returns True when file exists and is a block file
*-C Returns True when file exists and is a character file
*-D returns True when pathname exists and is a directory
*-E Returns True when pathname specified file or directory exists
*-F returns
The color of the text terminal can be generated using the ANSI non-normal character sequence. Example:
Echo-e "\033[44;37;5m ME \033[0m Cool"
The above command sets the background to blue, the foreground is white, the blinking cursor, the output
The 2nd generation Linux operating system in the installation of software is quite simple: the first step, search for the software you want, such as you want to find a game software, its name is called Myward, the Game Software description is: Myown
Install rsync in Redhat
1, first on the server and the client are installed rsync, my RHEL5 by default has been installed. When installing REDHAT5, you can see it in the "basic system" in software Customization-"basic" optional packages: rsync-2.6.8
Today, another Linux production environment to build. This is a lot of steps, very cumbersome and have to do things. Although many times, but there are many steps, orders do not remember, every time looking for information is troublesome, so take
You can use the SCP command when you want to transfer files between two Linux hosts, without entering a password after establishing a trust relationship. Copy your local host user's SSH key file to the remote host user's ~/.ssh/authorized_keys file,
Shell echo CommandDisplay Normal string:echo "I am cat_crazy."Note: The double quotes here can be omittedShow escape characters:If you want to output quotes, the * number needs to be escaped to output, as followsecho \ "I am cat_crazy\"The output is
1 First Test "/etc/vsftpd", "/etc/hosts" is the directory, and through the "$?" Variable view returns a status value to determine the test result.[Email protected] ~]# [-d/etc/vsftpd][[email protected] ~]# echo $?1[[email protected] ~]#
Progressive Web Apps is fast and installable, which means it can be used in an online, offline, intermittent, or slow network environment. To achieve this goal, we need to use a service worker to cache the application shell to ensure that it is
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.