Unix shell book

1. Basic Knowledge CAT/etc/ShellCHSH/bin/tcshEmacs = Vi?PdkshZsh B C KPID is 1 not 0 Home variables exists in passwd, And the last entry of passwd is sh. PS-Ef svr4PS au for BSD/Linux ps Echo $ statusEcho $? EUID // can be changed, like

Linux Shell iterates rows, words, and characters in a file.

When processing text files, It is very common to iterate and traverse rows, words, and characters in the files. A simple loop is used for iteration, coupled with redirection from stdin or a file. This is the basic method to iterate rows, words, and

Linux bulk modification of file suffix shell script

I wrote a shell script to modify the suffix and learned it with everyone.Below isSource code: The copy storage is myrename. Sh, which can be used in full accordance with the instructions.Here, I would like to remind beginners that single quotation

Shell tip command (z)

Http://hi.baidu.com/zxvb3000/blog/item/9ecd2b022d15490b4bfb5199.html 1. Test commandThe test command is used to check whether a condition is true. It can be used to test values, characters, and files,The test characters and corresponding functions

Shell-array usage

From: http://www.jb51.net/article/34323.htm Note: The subscript of the array in Shell starts from 0 by default. 1. Place the string in an array to obtain its length. Copy the Code as follows:#! /Bin/bashSTR = "a B -- n d"Array = ($ Str)Length =$ {#

Shell matching a regular expression

Is_upper () # Is_upper # Checks tosee if we have a string in upper case # To Call: is_upper $1 { # Check we have the right Params If [$ #-ne 1]; then Echo "is_upper: I need a string to test OK" Return 1 Fi # Use awk to check we have only

How to use for while until in shell script Programming

  Finally, we will introduce the common loop in shell script design ). The so-called loop is a piece of code in the script that is repeatedly executed under certain conditions.There are three types of commonly used loop in bash shell:** While*A For

Linux Learning Experience: Savor the details in shell scripts and user experience ^_^

I have been studying Linux for a week and a half. I wrote more than 20 shell scripts under the pressure of Marco Polo... Shell regular expressions, awk statements, program execution streams, test statements, sed statements, functions, and other

Linux Shell progress bar display function (Memo)

1. Code 1   #! /Bin/sh# Output "." progress bar function, compatible with bsh, KSh, and bash# First Trap 1 2 3 15 signal, importantTrap 'Kill $ bg_pid; ECHO; exit '1 2 3 15Function dots{Stty-echo>/dev/null 2> & 1While trueDoEcho-e "./C"Sleep

Introduction to % CPU in the ps command in Linux Shell

In the ps command, % CPU refers to the percentage of CPU usage time of a process. What does it mean? The man manual of PS is explained as follows: CPU utilization of the Process in "##.. #" format. Currently, it is the CPU time used divided by the

Shell-crontab quick Manual

This article is based on the following English documents: http://www.adminschoice.com/docs/crontab.htm. Cron is a UNIX tool that uses cron background processes to automatically execute tasks at a specific time in the future. These tasks are usually

Linux Shell SS

Meaning of SS socket state 1. view links [admin@v035114 ~]$ ssState Recv-Q Send-Q Local Address:Port Peer Address:Port ESTAB 0 0 10.232.35.114:43583

Obtain the MD5 value of a string in shell.

Today's group asked a question:Echo 123 | md5sumBa1f2511fc30423bdbb183fe33f3dd0f-Php-R "Echo MD5 ('20140901 ');"202cb962ac59075b964b07152d234b70The MD5 values of the two are inconsistent, so there are many interesting solutions:1 MySQL

Shell-redirection explanation

Standard InputThe standard input is the file descriptor 0. It is the command input. The default input is the keyboard, or file or other command output. Standard outputThe standard output is the file descriptor. 1. It is the command output. The

10 Best Practices for shell script Programming

Every programmer working on Unix/Linux may be good at shell script programming. However, the methods for solving problems vary, depending on the degree of professional knowledge, the types of commands used, and the way you view problems. For

Use shell commands in the awk Program

The awk program allows calling shell commands and provides pipelines to solve the problem of data transmission between awk and the system. Therefore, awk is easy to use system resources. There are two main methods: A. Syntax] awk output command |

Shell basics 67: execution sequence (| and &, {} and () and regular table expressions

From: http://bbs.chinaunix.net/viewthread.php? Tid = 445229 Quote: $ unset $ [-N "$ A"] & ["$ A"-lt 100] | echo 'too big! ' Too big! Why can we get the above results? Mark Question 1010) & | what is the

First shell program: Hello World

1 shell script must have the read and executable (RX) permissions.   2. Differences in script execution methods: 1) Sh script_name or./script_name: execute in the sub-process (a new bash environment) 2) Source script_name: executed in the parent

Chapter 4 control flow of Shell

Chapter 4 Control Flow Structure 1. If statementIf condition 1;ThenCommand 1Elif condition 2;ThenCommand 2ElseCommand 3Fi If conditionThen commandFi**************************************** ***********************#! /Bin/bashIf ["10"-lt "12"]ThenEcho

Linux Shell: copy a folder script

Write a script to copy the folder. Principle: first package the folder to be copied with tar, then copy the package, and then unpack the package.Receive two parameters. If the parameter is smaller than 2, an error is returned.If the target folder is

Total Pages: 541 1 .... 237 238 239 240 241 .... 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.