what in shell

Alibabacloud.com offers a wide variety of articles about what in shell, easily find your what in shell information here online.

Characters commonly used in shell scripts and shortcut keys in the VIM editor

Common shortcuts in the command mode of the 1.vim editorCommand functionDD Delete (cut) the entire line where the cursor is located.5DD Delete (cut) 5 lines starting at the cursor.YY copies the entire line where the cursor is located.5yy Copies

concurrency in shell scripts

The main record is the concurrency and serial execution of commands in the shell script.By default, the commands in the shell script are executed serially, and must wait until the previous command is finished before executing the next command, but

Detailed escape of special characters in shell command line (special meanings removed)

Special symbols and their escapeAs you know, a shell command is made up of a command name and its arguments, for example cat testfile , where cat is the command name and Testfile is a parameter. The shell passes the parameter testfile to the cat

Example of use of eval in shell

Function Description: Tell the shell to remove the eval parameters and re-calculate the contents of the parameters.Syntax: eval [parameter]Supplementary Note: Eval can read a series of parameters and then execute according to the characteristics of

Summary of 8 methods of string interception in shell scripts

This article mainly introducesShell8 Types of scriptsstringCutTakeThe method summarizes, each method gives the instance code and the operation result, at a glance, the need friend can refer to the nextstring truncation of Linux is useful. There are

Linux Startup issues BusyBox vx.x.xx built-in shell

This could be a disk detection error, especially after an unsecured shutdown or a damaged disk.Workaround:1. When selecting the startup item, select the first item, such as:Ubuntu 8.04kernl.2.6.22-16-generic2, press E to enter the editing state, in

Special usage of $0,$?,$! in shell

Variable Description:$$ The PID of the shell itself (Pro CESSID) $! PID of the last background process run by the shell $? End code of the last command run (return value) $- Flag list set with the SET command $* All parameter lists.

Using awk to process large volumes of data in shell scripts

First, the demand      original file a for 1.7g file, with 5 1700 Mangyo look. There are also 2 auxiliary files b and C, b c files are only 2 column. a1 and b1 same, A2 and C1 a1 B2, c2" a4 a5, the target file is named d.txtSecond,

9-13 all the knowledge points involved in Shell programming

Bash Script Programming:Variable: variable nameArray: Contiguous number of independent memory spaces, each memory space equivalent to a variable;Element: array name [index]Bash 4.0+Traditional arrays: Indexed as numbers, numbering starting from

&& in Shell-linux | |

When the shell executes a command, it returns a return value that is saved in the shell variable $? In When $? = = 0 o'clock, indicating successful execution; = = 1 o'clock, which indicates that the execution failed.    www.2cto.com   Sometimes the

Count rows in shell

Today I suddenly wondered how many lines of code I had written recently, and then I used the shell to figure out the most recent code: ? 1 Find/home/chengshuguang/mango-maxdepth 1-name ' *.c '-or-name ' *.cpp '-or-name ' *.h ' |

Conditional test in Shell

Condition test Type in Bash script: integer testString testFile testExpressions for conditional tests: [Expression][[expression]] expression must have a space before and after itinteger test :-eq: Tests whether two integers are equal and equal to

Example of awk, if while in shell

1. If while command is written in one lineWhile read a b;do echo $a $b;d one 12 13 14Cat Aa.txt12 13 14if [[$i-eq 0 | | $i-eq 2]]; then env=10.79.40.146:80; else env=10.79.40.147:80; Fi2. Awk merges two filesAccount CdrCat AccountZhang San

The assignment statement and Judgment statement in parentheses judgment in shell programming

#!/bin/bashdeclare var="XXX" #without space and use one =#1.judge Whether the assignment statement returns trueEcho"----------------------test Assignment in bracket--------------------------------"[var="yyyy"] && Echo"Success"Echo"End" #Success["$

Special usage of $0,$?,$! in shell

Transferred from: http://blog.sina.com.cn/s/blog_464f6dba0100psy9.htmlVariable Description:$$The PID of the shell itself (ProcessID)$!PID of the Shell's last running background process$?End code of the last Run command (return value)$-Flag at a

sed command in Shell

Sed-i '/CD ${ldir_dest}\/webextend\/pc && ln-s \/hard\/www_winclient\/bboxpc.exe./a\ \TCD ${LDIR_DEST}\/ WEBEXTEND\/PC && ln-s \/hard\/www_winclient\/' $i '. '#参考别人后自己改的, it's mostly a variable.Sed-i ' 4i dfsdfdsad ' xxx.txt #Insert contents between

Small problems in Shell programming

1, the variable with = assigned value when the left cannot have spaces. For example , UserName =nihao returns userName: Command not found . Because this place username as a command to deal with. The right approach is to Username=nihao.Careful is the

A 9*9 multiplication table written in shell script

The 1 script is as follows[[email protected] ~]# vim 99.sh #!/bin/bash # 9*9 Table # 2015.5.26 by Luzhi for i ' {1..9}do for J ' {1..9} do If [$j-le $i] then c=$ (($i * $j)) ECHO-E-n "$j * $i = $c \ T" fi do echo "" Done2 Operating effect650)

Examples of common applications in shell scripts

1. How can I redirect the standard output and error output to the same location at the same time?There are two ways to achieve this:Method One: 2>&1# Ls/usr/share/doc > Out.file 2>&1The implication is that if a file exists, the result is output to

In shell programming if the path name encounters parentheses

In Linux, if the file name is enclosed in parentheses, the parentheses should be processed first, preceded by "\" before "(" and ")". Bracket_handle gives the processing method:Sub Bracket_handle {My ($tmp _name) = @_;$tmp _name =~ s/\ (/\\\ (/g; # (

Total Pages: 15 1 .... 11 12 13 14 15 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.