Not comprehensive but practical.
1. xargs -- pass the output of one command to another
1.1 Find./modules/-name *. So | xargs CP-T $ {packdir_so }/
Output find to CP as the Source Parameter
-T specifies the target path of the CP.
2. Date =
A classic debugging method in shell scriptsAuthor Yu Chao Email: yuchao86@gmail.com
The common method for testing shell scripts is to use echo to output data to check whether the data meets the requirements.ProgramThe value of the operation.If the
In the 1980s s, most applicationsProgramIs to provide a command line analyzer-even now, this is also very important. For many years,. net has been missing a standard analyzer, so developers have to implement this common mode over and over again.
In
Official Website:
Http://intgat.tigress.co.uk/rmy/extensions/index.html
The extension has the following functions:
Move the clock to move the time to the right
Favourites in panel displays shortcuts for your favorite programs on the top
How to extract the line Content Code specified by the file:
If you only want to view the first five lines of the file, you can use the head command,For example: Head-5/etc/passwd
If you want to view the last 10 lines of the file, you can use the
During distributed parallel computing, you often need to upload compiled files to the same directory of each computing node. when there are many computing nodes, this work is quite tedious. the following example shows the script for transferring
Hill sorting is one of insert sorting. The insertion sorting algorithm mentioned in the previous article (click to View Details) should be called "directly insert sorting algorithm ", the hill sorting algorithm introduced here is an improved direct
Lu1 (){Echo 'aaaaaaaaa'}
Lu2 (){Echo 'bbbbbbbbbbbb'}The above is the source code of run. Sh. We can see that there are only two function definitions and there is no place to call these two functions. If we execute these two functions like
3D model data has been being parsed over the past two days. I wrote some test code in my spare time today. Analyzes the buffer overflow attack principles and shell code principles used by hackers. OK. Go to the topic. I hope you can correct anything
Usage of Linux Shell scripts in character Text Processing
Author: Yu Chao email: yuchao86@gmail.com
Shell may not be as powerful as perl, but it is also very useful for some special purposes.
Let's look at the following example:
[Yuchao @
The first shell script program. VI create a file test. SH and grant the execution permission
#!/bin/shecho 'hello word !'
Execution result: Hello word!
Shell script structure #! Start with/bin/sh, and next to the line feed is the program body.
Conditional expression:
1. File expression
# If the file exists if [-f file] # if the directory exists if [-d dir] # if the file exists and is not empty if [-s file] # if the file exists and is readable if [-r file] # if the file exists, you can
Document directory
Login shell vs non-login shell
. Bash_profile vs. bashrc
Which file is written?
When working in a Unix * like environment, you may encounter bash environment variable configuration. Every time you face some. Bash * files in
I have been idle for the past two days, playing Nb, starting with shell, and coming up with something interesting. Remember it by the way.
A simple script test_2 is written to output the user's parameters:#! /Bin/shIf [$ #-lt 2]; thenEcho "you need
How to Learn shell commands in Linux
I learned some of the scattered linux commands today. The following is a summary:
First of all, when you don't know how to execute commands, of course we need man. Let this man save everyone! Haha!
Common network
> Append
> Overwrite
> & Set the previous storage location to the next storage location
P.S.: Of course, there is still an inverse
0 standard input
1 standard output
2 standard errors
Example:
ls /usr/tmp 2> err.file
Write the error generated
Linux ShellLittle-known secrets in command lines
/* Pass the test in linux */One day, you wrote a very long command.$ Echo ooooooooooooooooooooooooooooooooooooooooooooYou suddenly don't want to execute it, and you want to delete the entire 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