1, Shell is the operating system Terminal command line(1) The shell can understand the command-line interface that the software system provides to the user, which can be said to be a way of human-computer interaction.(2) We can use the shell and the
1. Batch creation of files with random strings multiple methodsThis time, the $random variable is used.The Create command is as follows:echo $RANDOM |md5sum|tr "[0-9]" "[A-z]" |cut-c 3-8Output a random number via echo, then encrypt it by MD5,
What is a shell script, first of all it is a script, and not as a formal programming language, so to speak is that the shell script is a collection of commands.All custom scripting recommendations are placed in the/usr/local/sbin/directory, and the
Variable name: Use English, Numbers and _ (underscore), the beginning can not be a number, length unlimited, strictly case-sensitiveVariable settings: variable name = variable ValueNote: No spaces on both sides of the equals signYou can enclose the
I see Shell the first eye1 , script interpreter settingsfirst line of the script: #!/bin/sh[email protected] sun]# cat test.sh#!/bin/shFirst Firstrows can be split into two parts,#!and absolute paths,#!It's just a special notation,#!The interpreter
There are several ways to bash a shell script, and now make a summary. Suppose we write a good shell script with the file name hello.sh, the file location in the/data/shell directory and have execute permissions.Method One: Switch to the directory
what is a regular expression? Regular expressions are a grammatical rule that describes the pattern of character arrangement and matching. It is used primarily for pattern segmentation, matching, finding, and substitution of strings.two, regular
Give me a chestnut: V=jfedu.shiyiwen.comecho ${v%.*}A% is a non-greedy match, which matches the shortest result. % a non-greedy match from right to left, what does it match? Matches characters that have. *. Then of course it matches to. com and
1, the single-brace test command to separate the word of the variable, when the value of the variable contains whitespace, the variable is enclosed in quotation marks, while the double-brace Test command does not separate the word from the
Although the overall implementation of the automatic installation, but there are many needs to improve the place, such as:1. The code can only be run under the root authority, otherwise it will be wrong, this need to add permission to judge;2. You
There are 2 scripts that run daily on the mission planDTS_RSYNC.SH is responsible for downloading the SQL files that are backed up onlineDTS_INPUT.SH is responsible for importing the downloaded backup files to the local MySQLNow, the problem is that
Get the date of the dayDate +%y-%m-%dOutput: 2011-07-28Assigns the current date to a date variabledate=$ (Date +%y%m%d)Sometimes we need to use dates before or after today, so we can use the-D parameter of dateGet Tomorrow's dateDate-d Next-day
1. Shell IntroductionThe shell is the interface between the user and the Linux kernel, and if you think of the Linux kernel as the center of a sphere, the shell is around the outer layer of the kernel. When a command is passed to Linux from a shell
1. What is Shell scriptshell script is to use the shell's function to write a "program", the program is to use a plain text file, some shell syntax and commands (including external commands) written inside, with regular expressions, Pipeline command
The interactive mode is where the shell waits for your input and executes the commands you submit. This pattern is called interactive because the shell interacts with the user. This mode is also familiar to most users: Log in, execute some commands,
Sorry, this post has been postponed, people are lazy ... Look at this shiny headline and forgive me!Why is this article classified under a Mac? The first question, which we will explain later.What is ZSH? A second question ...Should you touch a
/************************************************************************** * OK335XS U-boot compilation problem & no Li Nux Shell Problem * Statement: * Mainly because the system was made by my master, he removed some information, and because he is
Directly on the code:#include "apue.h" #include int main (void) { char buf[maxline];/* form apue.h 4096 */ pid_t pid; int status; printf ("percent"); /* Print PROMT (printf requires percent to print%) * /while (Fgets (buf,
The following content is basically extracted from the Shell13 question.1. Truncation function${file#*/}: Take out the first/its left string: dir1/dir2/dir3/my.file.txt${file##*/}: Take out the last/and left string: my.file.txt${file#*.}: Take out
Thanks to the original, the article is very helpful.Transferred from: http://www.cnblogs.com/chengmo/archive/2010/10/02/1841355.htmlFirst, Judge read the string value
An expression
meaning
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.