Introduction to Linux Shell Programming

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

Share the powerful shell commands in daily work

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-

[Shell] Linux calculates the number of times a string "sent IP" appears in a file.

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

Automatically switch the shell to delete the small log script

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.      

Common shell programming and instances-continuous updating

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}

Use & replace if in Linux Shell

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

Shell Development notes

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.

Linux Shell queries data from databases and sends emails in CSV format

$ 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

Linux Shell Learning

1. Man Shows color characters In ~ /. Add the following content to bashrc: Export less_termcap_mb = $ '/E [01; 31m'Export less_termcap_md = $ '/E [01; 31m'Export less_termcap_me = $ '/E [0m'Export less_termcap_se = $ '/E [0m'Export less_termcap_so =

Unix shell programming (6)

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

Unix shell learning notes

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

Shell string Truncation

Removes the leftmost character from the string. [admin@v035114 ~]$ vi test.sh 1 STR="abcd" 2 STR=${STR#"a"} 3 echo $STR 4 STR=${STR%"d"} 5 echo

Linux Shell counts the number and replacement of words

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

Find in Linux Shell

Post address: cy158358.cublog.cn    #! /Bin/shcheck_patch () { Test-d $1 Return } # Check whether the path exists Check_patch $2 If [$? -Ne 0] Then Echo "No such path $2" Exit 1 Fiif ["$1" = "name"] Then # Searching for TXT files Echo "--------------

Shell (6)-command execution sequence

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)

Shell script Control Service Startup

/* =================================== Startacct. sh ===================================== */ #!/usr/bin/ksh./vbsvr_boot_boss.sh -s ./boss_server.lst > vbsvr_boot_boss.log & /* ================================= Vbsvr_boot_boss.sh ==================

Common shell command instance analysis-continuous update

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

We recommend a gnome-shell extension that features 15ora, 17, and 18. With taskbar

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

Quotes in Shell

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

Several shell questions

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 = ~

Total Pages: 541 1 .... 530 531 532 533 534 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.