Recently many students watching my video tutorial, the VII is curious about the goods, VII is a relative of VI? Why use it to create a new program to automatically populate the program framework code? Today, we'll have a steak.In fact, VII is a
Create multiple catalogs at once[Email protected] tmp]# mkdir-p/user/{folder1,folder2,folder3} [[email protected] tmp]# Ls/user/folder1 Folde R2 Folder3Find the largest 10 directories in the root directory and sort them from large to small by using
The Find command is used primarily for file or directory lookups.-print indicates that a matching file name is printed-print0 indicates that each matching file name is printed using the ' \ \ ' delimiter-name: Find by file name-iname Ignore letter
Cut [-bn] [file] or cut [-c] [file] or cut [-DF] [file]Instructions for useThe cut command cuts bytes, characters, and fields from each line of the file and writes those bytes, characters, and fields to standard output.If you do not specify a File
Example 1.The new test.sh content under/home/admin/test/is as follows:CD 'dirname $0echo 'pwd'Then return to/home/admin/to executesh test/test. SHOperation Result:/home/admin/testThis allows you to know the location of the files deployed with the
This article mainly introduces the shell script 8 kinds of String interception method summary, each method gives the example code and operation results, at a glance, the need for friends can refer to the nextString interception of Linux is useful.
#!/bin/bash # # ip_check This shell script takes care of checking all IPAddress. # # Create by Xuekun # date 2015-12-6 # Beijing Open Source # source function library. ./etc/rc.d/init.d/functions App_path= ' pwd ' Log_path=${app_path}/ip_
Take a few simple examples of the judgments involved1. Comparison of file-related judgments#!/bin/Bashif[$#-lt1 ] Then Echo "No file name"Exit1elif[-D $1 ] Then Echo$1is directoryelif[-B $1 ] Then Echo$1is block deviceelif[-
Common Options list all files under the directory contain hidden files ls-a list file properties and sort by modified ls-lt list file attributes and sort the file's most recent read time LS-LTU list file attributes and sort files by file size Ls-ls
1. Variable and variable values (expanded)If you need a variable name, use the variable name directly, or if you need a variable value, use the $ symbol. For example:Export Path=/home/bin: $PATHIf you're not sure if you want the variable or expanded
I. If statement format: Supports if/elif/else forms, supports nesting1. When command execution succeeds (and exit status is 0), execute Command22. When the judging condition is the test command, the Command2 is executed when the result is trueif
Linux shell expr use collectors: Spring and Autumn hundred flavor the-Geneva- +|read: Go:| |share non-original, excerpt from: "Linux and Unix Shell Programming Guide"17.5expr Usage The expr command is generally used for integer values, but can also
The function of the WC (Word Count) command in a Linux system is to count the number of bytes, words, and lines in the specified file, and to display the output of the statistic results.1. Command format:WC [Options] File ...2. Command
Learning Shell The script experience
Shell script Run Environment:Shell script, is to put multiple commands, organized into a file, to implement a series of actions, convenient execution of a file.
Shell scripts are primarily used in
In the shell command terminal. CTRL + N is equivalent to the direction down direction key, ctrl+p equivalent to the direction upward direction key.In the command terminal through them or the direction of the key to achieve a high-speed search
/******************************************************************************* * Linux Shell Ls-1 Column Display file * Description: * Sometimes when writing shell scripts, it is often necessary to list the files in a column, and then the * for
Today, let's introduce some common shell commands in the Mac Terminal:1. View the full path to the current working directoryPwd(PWD's original intention is: Print work directiory, not password password meaning, hehe)2. View the command's detailed
shell scripts have now become a very common scripting language, so widely used, there is no doubt that it has its unique. What is the difference between a shell scripting language and other languages, such as C + +? C + + and other languages are
Sort by the second character of the 1th field, if the field is only 1 characters followed by a number, the order of the letters after the normal sort of 2 charactersRepeated lines in a uniq are repeated without repeating rows, such as:1122And the
This note is for the early ximo of the shelling Basic video tutorial, organized notes. the tools used in this note:http://download.csdn.net/detail/obuyiseng/9466056TelockAction 1. Last Exception Method 1, Option---DEBUG
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.