Five, string processing1. Sub-string interception operations:Path segmentation:DirName command: Locate the folder where the target is locatedbasename command: The name of the target object, usually refers to the file name or the lowest-level
Built-in commands for Bash shell1. (View command properties) type [-TPA] name: When no arguments are added, the external command or Bash internal command is displayed
-T:
File: Represented as an external command
Alias:
Fundamentals of the ten-year OPS series-LinuxZeng LinContact: [Email protected]Website: www.jplatformx.comCopyright: Please do not reprint the article without permission
First, IntroductionAs scripts become more complex, you need to see where
The original link is: http://blog.sina.com.cn/s/blog_963453200102uya7.html& placed after the startup parameter to set this process as a background processBy default, the process is the foreground process, then the shell is occupied, we can not do
Escape: a backslash (\) is placed before a character that needs to be escaped, indicating that the character is to be treated as a normal character.The escape character is occasionally used when using sed awkFor example, I insert a string from line 8
Organized from: http://blog.chinaunix.net/uid-22101889-id-3167454.htmlNote: Please use it carefully, so far, I haven't found a way to change it back.1. QuestionsFirst, many large companies of the server are not allowed to log in directly, but
about SEDSED is a lightweight flow editor, shorthand for stream editor. Because SED is an edit file in the behavior unit, it is also called the line editor. It automates editing by eliminating the need to edit data directly.How SED works:Read the
Http://baike.baidu.com/subview/849/15831672.htmHttp://en.wikipedia.org/wiki/Shell_ (computing)Common commandsCat file name output file content to basic output (screen or add >filename to another file) CB format source code chmod//change mode, change
Du simple Usage exampleDu-SH xmldb/Du-Sm* | sort -n //statistics current directory size and size sorting du -sk *| sort -ndu -sk * | grep guojf //look at a person's size du -m | cut -d "/" -f 2 //See text before second/character See how
Cat stands for concatenate.Case 1.When the text files has more blank lines, we want to remove them.We can use Regex \s+ ' \ n '.Cat File.txt | TR \s ' \ n 'Cat-t file.txt # Show Tabs as ^.Cat-n file.txt # Show line numbers. Specifies current
Writing a very simple script, the results are very strange.1 #!/bin/bash 2 3 path= $HOME/vlc_transplant4 4 5rm -F $PATH/ VLC6Ln -S $PATH/bin/vlc-static $PATH /vlcExecution Result:[Email protected]:~/vlc_transplant4$./update. SH . /update. SH 5
1. Display up to 10 processes consuming memory/cpuPS aux | Sort-nk +4 | TailPS aux | Sort-nk +3 | Tail2. View the number of concurrent requests for Apache and its TCP connection statusNetstat-n | awk '/^tcp/{++s[$NF]} END {for (a in S) print A, s[a]}
This time change the structure of the notes directly. Lit LEDs are always an introductory routine for learning MCU,ARM,FPGA, which can be said to be a classic routine. The author also started the Arm learning journey from the point of light led.The
Syntax for the Read command command:Read [parameter] variable name commonly used parameters are as follows:-t timeout to set the time-out.-P Prompt Sets the prompt message, which will appear before the cursor.Condition test:The condition test can
How to invoke a Java process using a shell script and look directly at the script:650) this.width=650; "id=" image_operate_42341429521334142 "name=" image_operate_25201429521283714 "src="/HTTP/ s4.sinaimg.cn/mw690/001wpbclgy6re3ma1lt83&690 "width=" 6
inadvertently see the router inside there is a dynamic domain name, and later on-line a check that it is possible to establish a personal website, and then allow other users on the network to access their own servers, such as their own establishment
Shell exit, return summary, shell exit summary
Common Responses in shell: exit, breakm, return
Exit:
In fact, after each command is executed, an execution state is returned!
If the execution is successful, 0 is returned.
If the execution limit
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