Basic shell knowledge:
1. Shell Condition Statement, that is, parameters in if:
Http://www.ibm.com/developerworks/cn/linux/shell/bash/bash-2/index.html
2. Many similar programming errors will be removed if all string independent variables
1. display the top 10 processes that consume the most memory/cpu ps aux | sort-NK + 4 | tailps aux | sort-NK + 3 | tail ---------------------------------------- 2. view the number of concurrent Apache requests and their TCP connection status netstat-
I tested the product performance a few days ago and ran for several days.Program, Stopped today, because the program is not very stable, the test is complete, it is required to count how many times the program started. So I opened the log file and
To delete logs, you need to switch the user to specify the directory for deletion. Therefore, you need to determine whether the script can be automatically implemented. The direct su command fails, so telnet to the local machine is used.
This article by larrylgq prepared, reproduced please note the Source: http://blog.csdn.net/larrylgq/article/details/7395261
Author: Lu guiqiang
Email: larry.lv.word@gmail.com
Variable:AAA = "LV"; do not use SpacesEcho $ AAA-> LVEcho $ {AAA}
Reading the Linux Shell written by othersCodeSuddenly found a lot of code similar to the following format:
["$ Pro" = "1"] & ckssl = "-- SSL" [-n "$ IP"] & ckip = "-h $ IP" [-n" $ port "] & ckport ="-p $ port"
I didn't understand why I wrote
1. For and if commands containing [] must be separated by spaces.
2. Calculation and Assignment Methods
Var = 1 (Note: Bash/pdksh cannot leave spaces on both sides of the equal sign)
First: (VAR ++ ))
Type 2: var =$ ($ var + 1 ))
3.
$ ORACLE_HOME/bin/sqlplus-s username/password @ InstanceName>/dev/null 2> & 1 # Set sqlplus, make it output only the required text set echo off set pagesize 0 set verify off set feedback off set termout off set linesize 3000 set trimspool on
Unix shell programming (6)
VariableUnix shell allows the value to be included in the variable.To store a value into a variable, you only need to write the variable name, followed by an equal sign, followed by the variable value.Variable = ValueDo
Recently I reviewed some Unix shell programming. In fact, UNIX is a very good operating system, and it may not be as easy as Windows XP in terms of ease of use and user experience. However, many underlying ideas and script technologies are
1. count the number of occurrences
: % S/178 // ng
Text Test
711[10.235.170.22:8123] 0 10.232.20.178 1648042 1648042 0 2013-07-29 20:01:35711[10.235.170.22:8123] 11 10.232.20.178 6445135
1. Run the &: & command on the left (command 1) To return the true result (0 is returned, and the result is successfully executed), and run the & command on the right (command 2) can be executed;
2. Run |: if | the command on the left (command 1)
Common Programming and example of Shell on: http://blog.csdn.net/larrylgq/article/details/7333632
1: ls * | while read FN; do grep-V ', 11,1108, 1133,110816, 110816' $ FN>/data1/hadoop/back_up/tmp/$ {fn} _ 08171819; done
Ls * output
| Media
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
From: http://www.lampchina.net/article/htmls/200903/MjE4Njk1.html
Function of quotation marks
1Double quotation marks ("")
1) Use""Referable except characters$ (Dollar sign),`(Reverse quotation marks ),/Any character or string outside
1. for I in $ (seq 0 9); do touch file $1; done2. sort-k 1-t ': 'passwd | awk-F': ''{print $3": "$4": "$5 }'3. diff-B file1 file24. isodump-I out. iso-x/media/cdrom; umount/media/cdrom # the usage of cdrom is not considered.5. dd if =/dev/zero 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