Generally, the standard login shell (not just bash) is read at startup.
The/etc/profile file also contains the. profile file under the user's home directory.
So you can make some variable settings in these places.
Such as language encoding, $
1. The priority ranges from-20 to 19. The higher the priority, the lower the priority.
2. Nice can specify a modest (priority) Increment value for the process when creating a process, the priority value of a process is the sum of the shell
Recently, shell has been used. It is very simple and has no logic. I wrote it here just to help myself remember it. It's just a messy note. I hope this will help you. Please advise me more.
1 If else
If [$ #-lt 5]; then
HelpExit 1
Else
Do
To call a function in a shell file compiled by yourself, use the following method:
For example, you have compiled a test. Sh file as follows,
#============ Test. sh:
#! /Bin/shEcho_line (){Echo dateEcho "Wellcome to shell func! "}Echo_line
Exec also allows the script to be executed in the same process, but the original process is ended.
Script content:
Root @ James-desktop:/opt/Qt-everywhere/Marvell/APP/applications/factory-Roast # Cat 1.sh#! /Bin/shA = BEcho "PID for 1.sh:
Shell string truncation problem:1. Linux Shell intercepts the first eight characters of the character variable by using the following methods:1. expr substr "$ A" 1 82. Echo $ A | awk '{print substr (, 1, 8 )}'3. Echo $ A | cut-c1-84. Echo $5. expr $
The so-called location parameter refers to the shell script command line parameter. In Shell functions, their colleagues can also be function parameters. Each parameter is named by an integer. For historical reasons, when it exceeds 9, it should be
This article mainly summarizes some of the basic knowledge worth noting in shell programming.
1 .#! /Bin/Bash must be placed in the first line of the file
2. num = 2. When values are assigned, spaces are not allowed on both sides.
3. Echo "this
Modify the/etc/ssh/sshd_config file, find clientaliveinterval 0 and clientalivecountmax 3, and remove the annotator,Change the value of 0 corresponding to clientaliveinterval to 60,Clientaliveinterval specifies the time interval for the server to
Full text link: http://www.61eda.com/Services/peixun/IC/200912/2232.html
The GUI debugging problem of visual JTAG encountered yesterday was finally solved. The riple direction is correct. The TCL script starts to add init_tk, and waits before
ArticleDirectory
File status test
1. File condition test-R readable-W writable-X executable-D directory-F: General Files-Block B Devices-C character device-U file SUID-L Symbolic Link-S file is greater than 0, not empty-E: whether
Job Control
Bash can run jobs in the background or in the foreground. A running
Program It is called a process or job. Each process has a process ID, PID. Generally, all programs run on the foreground. You can use Ctrl + D to send a signal to
In the Linux Shell environment, input and output redirection is supported, expressed by symbols . 0, 1, and 2 indicate the standard input, standard output, and standard error information output, which can be used to specify the standard input or
Style files are often processed row by row. In Shell, how to obtain each row of data, then process the row of data, and finally read the next row of data can be processed cyclically. There are multiple solutions:
1. Run the READ command.
The
1. binary output file
Cat can open text files and cannot output files in binary format. Both the OD command and hexdump can complete the binary output task as follows:
(1) OD command
Od-tx4-an-v-W1 dos_setenv.sh
-T indicates the output type.-TX
I have learned shell scripts before, but it has never been used in my work. To prevent repeated startup of PHP scripts, I need to write a shell,
What I learned was finally used. I wrote this script with the knowledge points I remembered. I want to
Software shelling can compress the volume to prevent resource modification and increase the difficulty of cracking. We need to debug a software. Generally, the non-compressed Shell needs to be removed first.
Program Debugging is supported. Common
There are three common file descriptors in shell programming:0: stdin, standard input. The default value is the keyboard input.1: stdout, standard output. The default value is screen output.2: stderr, standard error output. The default value is
Use the nohup command to make Linux programs always run in the background (from: http://www.einit.com/user1/11/archives/2006/3603.html)
In Unix/Linux, you generally want to run a program in the background. Many of
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