Summarize shell questions in the group

File22924 183.136.221.76 20020747 119.146.204.15 20019563 61.182.133.37 20019150 112.85.218.29 20018002 113.106.128.3 200123 113.106.128.3 200 File B113.106.128.31.1.1.161.182.133.37 Ladies and gentlemen, how can we print out all the records of

Some details about Unix shell programming

The test statement must have spaces before and after the equal sign, and there can be more than one space. To promote it, there must be no spaces before and after the equal sign of the value assignment statement, non-assignment statements require

Leeboy's Linux learning fifteen shell conditional testing and simple conditional statement instances

1,Echo $?: An exit status is returned when any command is running, and the exit status of the previous command is output,0Indicates that the exit is successful. 2, Test File status:[-W text]Test whether the file can be written,Echo $?The output is0

Shell reads the row and column of a file

I want to perform frequent operations on a file. To obtain the values of different columns in each row, I know the method isWhile read lineDoEcho $ Line | awk '{print $1}' # obtain the value of the first column in each rowEcho $ Line | awk '{print $2

Shell script syntax

Shell script:#! /Bin/Bash must pass the first line #! To specify the Current Shell I. variables:"": Allows you to reference values of other variables using the $ symbol.'': Other variables cannot be referenced. $ is considered as a normal

Shell (3) redirection .doc

Normal 0 7.8 磅 0 2 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable{mso-style-name:普通表格;mso-tstyle-rowband-size:0;mso-tstyle-colband-size:0;mso-style-

Special symbols of Linux Shell

Compare shell strings and determine whether the string is a numberBinary comparison operator, which compares variables or numbers. Note the difference between numbers and strings. ◆ Integer comparison -EQ equals to, for example, if ["$ A"-EQ "$

Shell if statement Parameters

◆ Parameter description-B. returns true if the file exists and is a block file.-C: returns true if the file exists and is a character file.-D. If pathname exists and is a directory, true is returned.-E: returns true if the file or directory

Linux Shell Parameters

InShellProgramming.You can use parameters.ShellLocation and Internal Parameters 1 ,Location parameters The parameters provided by the system are called location parameters. The value of the location parameter can be used $ N Get, N Is a

AIX shell log pressure and Deletion

#/Bin/sh # Add By zhoujf. Free log file; Dir_list = "/product1/port/bin/ocs_subscriber_import/back" Log_list = "* 201 *. unl" Gz_day = 3Del_day = 30Core_day = 7 Cur_time = 'date + "% Y % m % d % t "'Echo "start at [$ cur_time]" For dir in $

Execute the jar method in Shell

Counter = 'ps-Ef | grep sync. bankcardbatchpay | grep-V grep | WC-l'If ["$ counter"-EQ 0]; thenEcho "No sync. bankcardbatchpay is running"ElseKill-9 'ps-Ef | grep sync. bankcardbatchpay | grep-V grep | awk '{print $2 }''Fi Classpath =

Example of executing SQL in Shell

Dbstr = "Busi/xxxx @ CRM" Send_sms () {Pcount = 0For phone in $ phonelistDoTime = "inf" 'date + '% Y % m % d % H % m % s''Comm_sn = "$ {time} $1 $ {pcount }"Echo "comm_sn =$ {comm_sn }"SQL = "insert into Busi. log_sms_pay values ('"$ comm_sn"',

Shell statistics PV, UV, independent IP

The daily log analysis team is really sorry. We often need to provide statistics such as PV, UV, and independent IP addresses. C/C ++ and Java can all be used to write logs. The process is like this, first, read the file, scan it row by row, put the

Floating Point calculator in Linux Shell learning-Bash

Linux bash calculator is easy to use, at least it is easier to be lazy. How: 1. Use the command line# Scale indicates the exact number of digits of a floating point.[Root @ hostname ~] # BCBC 1.06Copyright 1991-1994,199 7, 1998,200 0 Free

Accurately clear the Squid cache using shell scripts

This script was modified on the cache cleanup script of Zhang banquet, mainly to add the if option, and select the address of the cached file based on the $1 parameter type (because $1 is not fixed, sometimes it is a specific JPG type, sometimes it

Shell (7) User 2.16.doc

Command line parameters, Positional Parameter $0Complete program name(BasenameCommand to remove the path) $1The first parameter, exceeding9Hour$ {10} $ #Number of parameters $ *All parameters in the command line, as a word $ @All parameters in the

Shell (10) commonly used command. Doc

Ls -L, show the hard link count; -I, show I-node -H, human readable -T, sort by modify time -S, sort by size -R, -- reverse -R, show content of sub-Dir -V, sort by version  CP -P,Retain source file attributes, such as the modification time -L,

Automatic Interaction with Linux shell scripts

Method 1: (take the copy and generate key after OpenSSH compilation as an example) #! /Bin/bashdir_path = $ home/sshdfilecp sshd $ dir_path/sbincp scp sftp ssh-add ssh-Agent ssh-keygen ssh-keyscan $ dir_path/bincp sftp-server ssh-keysign $ dir_path/

Read options and usage in Shell

1. Read options Read can have eight options:-A,-D,-E,-N,-P,-R,-T, and-s. -: Read the content into the value echo -n "Input muliple values into an array:"read -a arrayecho "get ${#array[@]} values in array" -D: Delimiter, that is, the delimiter.

Shell Condition Statement

I. Shell Condition Statement (if usage) If statement structure [if/then/Elif/else/FI]   If condition test statement Then Action [Elif Condition Action Else Action ] Fi   If you are not clear about the conditional test statement, refer

Total Pages: 541 1 .... 508 509 510 511 512 .... 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.