Shell commandsXargs
Build and execute command lines from standard input
Xargs can be readStdinAnd use a space character or line break character as the resolutionStdinData is separatedArguments.
1) Description
Xargs [-0epn] command
Options
Parentheses
The parentheses structure can force the command to run in the sub-shell. Its basic format is:
(
Command 1
Command 2
...
Command n
)
The N commands in parentheses are run in the sub-shell. After bash version 3, the internal
Bitwise operator.
Bitwise operators are rarely used in shell scripts..Their main purpose seems to be to operate and test from sockets
Read variables. "Bit flipping" is closely related to the compilation language , for example, C/C ++ , in
Bash -- DebuggerScript Script-arguments... Having used to VIM, writing BASH Shell also uses it. Generally, shell is short, so there is no way to improve efficiency, today, I accidentally saw someone mention a bash support plug-in for
Http://rimuhosting.com/howto/profile.jsp
Linux Shell environment setup using/etc/profile. d /*
When a user logs in, environment variables are set from various places. That between des:
/Etc/profile (for all users ).
Then all the
> VI copy and paste
Move the cursor to the beginning of the part to be copied. Run ESC to exit the insert mode. Press V to enter visual mode. Use hjkl to select the part to be copied.
Press Y or YY to copy
Move the cursor to the target
I found an example online, which is simple and practical as follows.
There can be a background process that takes some operations when timer times out.
#! /Bin/KSh # delaytime = 0 alarmhandler () {echo "Get sigalam" killsubprocsexit 14}
Original article link
While read wone wtwo wthreeDo[-Z $ wone] & continue # test whether the content of this row is emptyXxx = $ wone # extract contentDone Echo "$ XXX" # The variable obtains the content in the file.
The following methods cannot
1. Count the total number of rows of all common files in a directory
# Practical scenarios: when designing a graduation project, you need to calculate your ownCodeNumber of rows #
Solution 1:Find.-Type F-name"*. C"-Exec cat {}\; | grep-V'^ $'|
Replace file1 with the actual file as follows
1. query the row number of the empty row in file1.Grep-n "^ $" stl_stable_sort.ccRefer:Common grep commands
2. query the rows ending with ABC in file1.Grep-n "^. * ABC $"
Before scripts runs, the most feared problem is the syntax error! So how can we debug it? Is there a way to determine whether there is a problem without directly running the scripts? Haha! Of course! Let's take the bash-related parameters for
1. find Find pathname-options [-print-Exec-OK] let's take a look at the parameters of this command: path of the Directory searched by the pathname find command. For example, use "." To represent the current directory, and use "/" to represent
$ {# String} $ String Length
$ {String: Position} In $ string , Extract substring from position $ position
$ {String: Position: length} In $ string , Extract substrings with a length of $ length from the position $ position
This series will focus on the advanced usage skills in Linux Shell. It is mainly intended for experienced Shell developers, Linux system administrators, and Linux enthusiasts. The examples in the blog mainly come from the Internet and some classic
My colleague asked me a question about awk today. It means that the several rows of data obtained through the awk operation are not fixed. You need to store the obtained rows of data in an array and do not want to use loops. After one afternoon's
1. http://edsionte.com/techblog/archives/3712 echo and backslash
Group records:2. This is only a variable. Double quotation marks will prevent shell tokens from echo "a B" and echo a B.
3 --------
4 "a B" is a parameter of echo, while echo a B is
It may have been a long time to stay in the shell, so that the current world is almost confused.This is the case when developers are busy with development and do not know the changes in the environment around them all day long. Maybe in
The Shell script is mainly used to initialize the new Linux server system, including:
Disable IPv6 ModuleDisable SELinuxShow vim colorsSet system language EncodingOptimize system servicesKernel Parameter optimization.It can be modified according to
When accessing the ps1 file, be sure to check whether the access path contains spaces.
Spaces must be enclosed in single quotes.
PowerShell-command Set-ExecutionPolicy "Bypass" set filepath = '% CD % \ AppDeployment. ps1 'powershell-command "& %
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