[Shell Foundation]--uniq Command

Common options for Uniq commandsRemove Duplicate rows-U display non-repeating rows-D shows duplicate rows-C Print the number of repetitions per lineThe test text content is as follows:# Cat 4.txt11111122222222333333334444(1) Uniq# Cat 4.txt | Uniq

[Shell Foundation]--cut Command

Cut command common optionsThe test text content is as follows:# cat Name1.txt name1 alvin1name2 alvin2name3 alvin3name4 alvin4# cat 2.txt name1:100name2:101name3:102(1)-CCut the 1th character of each column# Cat Name1.txt | Cut-c1NNNNCut the 1th, 3-4

[Shell Foundation]--paste Command

The test text content is as follows:# cat Name1.txt name1 alvin1name2 alvin2name3 alvin3name4 alvin4# cat name2.txt name1 100name2 101name3 102CCCCCCCCCCCCCCC C(1) Paste merge each line of two files by one by one# paste Name1.txt name2.txtname1

HDU 5730 Shell Necklace FFT+CDQ Division

Topic linksDp[n] = Sigma (A[i]*dp[n-i]), given a1.....an, Dp[n]. N is 1e5.The form of this equation is obviously a convolution, so you can use the FFT to optimize it, but this will also time out. So you can use the CDQ to optimize the partition.CDQ

shell--parameter passing

In the shell, arguments can be passed to a function when it is called. Inside the function body, the value of the parameter is obtained in the form of a $n, for example, "$" for the first argument, and $ for the second

Shell Getting Started Tutorial: Process Control (5) for loop

The For loop works by taking the element one by one of the serial element out, putting it into the set variable sequentially, and then repeating the enclosed command area (between do and done) until all the elements have been exhausted.Where serial

Execute the shell script times wrong Let:not found several solutions

First, several commands are elaborated.Echo $ shows the currently used shell versionDpkg-reconfigure Setting the package typeThe reason why the newspaper is wrong:The default shell parsing used by Ubuntu is a feature that Dash,dash only part of

Shell Getting Started Tutorial: Process Control (4) Case condition judgment

Syntax structure of case:Case to test item in style string 1] command area 1;;( Style string 2) command area 2;; Style string 3) command area 3;; *) command area;; Esac Command area, can be a single instruction or multi-line instruction, but

Shell Programming-operators

1.declare commandDeclare declaring variable type: Declare [+/-][option] Variable name-: Set type attribute to variable+: Cancels the Type property of a variable-A: Declaring a variable as an array-I: Integer-X: Environment variables-R: Read-only

Shell script calls a stored procedure with parameters

Mainly has#!/bin/bashsource /etc/profilesource ~/.bash_profile################################################ ################## #功能描述: Call a stored procedure with input parameters and output parameters # Execution period: Day # crontab: * 1 * * * 

Shell's basic commands

There are a number of ways to intercept strings in the shell, ${expression} There are 9 ways to use them. ${parameter:-word}${parameter:=word}${parameter:?word}${parameter:+word} The above 4 alternatives can be used for default values. ${#parameter}

Shell environment variables & parameter variables

Environment variables $HOME Home directory of the current user $PATH A colon-delimited list of directories to search for commands $PS 1 A command prompt, usually a $ character, but in bash,

Shell to determine if the service is running

Using shell scripts to check service opening conditions#!/bin/bash# need to install Yum install Nmap first-y# checks whether the specified port is on function checkportstatus () {Status= ' Nmap-ss127.0.0.1-P $1| grep Open | Awk'{print $}'` if[

Shell Scripting App

Parse the scrambled log file into the temp file, then use the AWK1004CD/USR/LOCAL1005LL1006CD  pttmsg/ 1007  ll 1008  cd msgbin-2/ 1009  ll 1010   cd proxy 1011  ll 1012  cd log 1013  ll  1014  tail -1000 proxy_sub0_20160107.log  1015  grep  ' = = =

Shell's/bin/bash script base combat

I rookie a, first contact with the Linux shell script;Shell script, the simplest function is to write a lot of instructions together, so that users can easily be able to execute multiple commands, and shell script provides arrays, loops, conditions

Linux----->shell Advanced programming----SED applications

backgroundsed is a good file processing tool, itself is a pipeline command, mainly in the behavior of the unit processing, you can replace the data rows, delete, add, select and other specific work.SED is intended to be a stream editor (Streameditor)

Variables of shell scripts

Common shell variables are: custom variables, environment variables, positional variables, predefined variables, and so on.Variables: Can be stored in a variable value of space, can be changed by different environments, is a variable value. Echo

Write a mock shell under Linux

1, first understand the Shell's basic framework650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/83/46/wKioL1duhrXze92MAAAmKDBM0i0805.png "title=" 2016-06-25 21-26-40 screen. png "alt=" Wkiol1duhrxze92maaamkdbm0i0805.png "/>As shown[User

Shell Terminal shortcut key summary (MAC)

In summary, the development system is OS X 10.11.4, the tool is ITerm2, and the practice is currently based solely on that environment.1. Most commonly usedCmd+c: CopyCmd+v: PastingTAB: ComplementCTRL + A: Move to command start positionCtrl+e: Move

Shell Programming Arry Arrays

1. Copying and fetching valuesAssign Value #!/bin/basharry_name= (xiaoming xiaoli dalong Sanlang) echo ${arry_name[0]}echo ${arry_name[1]}echo ${arry_name[2] }echo ${arry_name[3]}[[email protected] ~]# bash Arry.shxiaomingxiaolidalongsanlang[[email

Total Pages: 541 1 .... 423 424 425 426 427 .... 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.