The sort of shell programming

SortSort operations, which are sorted according to a set of rules for one or more rows in a file. Output to standard output and is not saved to any file.-t specifies the filed delimiter.        By default, spaces are specified, and multiple spaces

Number of shell statistic features

Today is too lazy, do not want a characteristic of a feature to statistics, and write a script#!/bin/bashdir_bas=$ (CD $ (dirname ${0});p wd) a= ' cat $dir _bas/feat ' feat_bas=$1total=0for B in $Ado echo $B Count= ' grep ' $B ' $feat _bas |

Linux shell scripts execute in other directories

egFor example, when running rails's own server under Linux, this command is required rails_evn=production rails S is not a bit verbose, every time to hit so many words, can not tolerate, fortunately, we have shell script help. Create a script of

Shell Password Expiration detection script

#!/bin/bash#添加计划任务#mkdir-P/scripts/#touch/scripts/passwd_expire_check.sh#vim/scripts/passwd_expire_check.sh#chmod 755/scripts/passwd_expire_check.sh#vim/scripts/passwd_expire_check.sh#01 XX * * */scripts/passwd_expire_check.sh#define Script

Shell Font Color

ECHO-E: Enable conversion of backslash control charactersExample:Echo-e "\033[40;37m Black Bottom white Kongring \033[0m"Echo-e "\033[41;37m Red bottom white Kongring \033[0m"Echo-e "\033[42;37m Green bottom white Kongring \033[0m"Echo-e

Shell Foundation and Process Control statements case judgment

The Last Post describes the while statement, while the basic use and the dead loop and the file test method, and so on, or that sentence if you want to master all the need to practice many times.This blog introduces the case statement, the

Location parameters of Linux shell programming

The positional parameter is a special variant of the shell that is used to pass parameters to the program when running the shell.$ A indicates the name of the script;$ $ represents the first argument, the sum is the second argument, and so on, when

Location variables in the Linux shell

For the location variables in the Linux shell, I have always been unable to spit out and swallow, every time I see do not understand, do not understand the Baidu Google, read and forget, is really chronic pharyngitis ah. Now seriously think about it

Some conditions of the shell judge

1. Shell to determine the file, whether the directory exists or has permissions2. #!/bin/sh3.4. Mypath= "/var/log/httpd/"5. myfile= "/var/log/httpd/access.log"6.7. # the-x parameter here determines whether the $mypath exists and has executable

Shell Check Company surviving PC

If the leader tells you to check the company when you're off duty. Those PCs are open, one to see? NO, it's too much trouble. The following script can quickly find the surviving PC through the ICMP ping packet, it is important to note that the local

Example of a simple function in a shell script

This script my_name shows how the arguments to the function are passed, and how the function returns a value of TRUE or false. Use a parameter to invoke the script, which is the name you want to use in the problem. Shell script

Writing the shell thing.

To write a script that calculates prime numbers (primes). Khan 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0016.gif "alt=" J_0016.gif "/> himself to the present, the number has no concept,I don't know how to write it.In the Baidu

Shell Remote Copy Script

#!/bin/bashtext= ' host_list ' line= ' awk ' 1 ' host_list|wc-l ' for ((i=1;iCat Host_list192.168.209.133 Root 123456This article is from the "Eight Miles" blog, so be sure to keep this source http://5921271.blog.51cto.com/5911271/1582833Shell

Use of sed in the shell

1. In the command Line Definition Editor commandcommand format sed options script fileSED does not modify the text file's data, he only sends the modified data to stdout.2. Use multiple editor commands on the command linePlace the command in a

Shell Date Command Collation

Recently found that the date command is especially useful (not in Mac)1. Get today's date[Email protected] ~]# date +%y%m%d201411232. Get the date of a day" 2014-11-12 " +%y%m%D20141112This seems like crap, but it's okay, keep looking.3. Get a day

Shell programming-sort and shellsort

Shell programming-sort and shellsortThe sort sorting operation sorts a row in one or more files according to the set rules. Output to the standard output and will not be saved to any files.-T specifies the filed separator. The default value is space.

Shell programming control structure: expr, let, for, while, until, shift, if, case, break, continue, function, select, exprcontinue

Shell programming control structure: expr, let, for, while, until, shift, if, case, break, continue, function, select, exprcontinue 1. expr calculates the integer variable value S = 'expr 2 + 3' The operator numbers and parameters must be separated

Linux shell programming location parameter, linuxshell

Linux shell programming location parameter, linuxshell Location parameters are a special shell variable used to pass parameters to the program when running shell. $0 indicates the Script Name; $1 indicates the first parameter, $2 indicates the

Summary of using shell scripts

Summary of using shell scripts (1) The csh script can call the bash script, and vice versa. (2). How to call variables and functions defined in other scripts. (3). Defined variables. The default value is global variables. You must specify local

Shell Study Notes (2) Regular Expressions in shell and shell Regular Expressions

Shell Study Notes (2) Regular Expressions in shell and shell Regular ExpressionsThe difference between a wildcard and a regular expression is the native syntax supported by bash. A regular expression is a way to process strings. A regular expression

Total Pages: 541 1 .... 477 478 479 480 481 .... 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.