Shell Script Learning Summary----sed+grep+awk+ Regular================================================================================First part SED================================================================================I. INTRODUCTION of
Because the shell script is used in the project, the system looks at it a bit. Previously, it was a general understanding. Variables: Environment variables, pre-defined variables, positional variables, custom variables. Environment Variables This
SET-E # Exit The script if an error happensScript ASet +e # don ' t bail out of bash script if CCache doesn ' t existScript BSET-E # Back to regular ' bail out on error ' modeScript CAs a script shell above,The script in a and C executes when the
by Francis_hao Oct 1,2017This article extracts the Man Handbook from bashConditional expressionsThe conditional expression is composed of a composite command [[or] built-in command test and [used for testing file properties and string or numeric
1. Load the configuration file sequence during the Linux login process:/ETC/PROFILE→/ETC/PROFILE.D/*.SH→~/.BASH_PROFILE→~/.BASHRC→[/ETC/BASHRC]You can view the default ~/.BASHRC file as follows:1 cat ~/2# BASHRC34# User specific aliases and
There are n kinds of methods, awk, sad, grep, cut ...The above several ways do not write, just write two less commonly used to.Say less nonsense, directly on the code:Cat a.txt aa.gif=aaaa.gifbb.gif=bbbb.gifcc. gif=cccc.gifMethod One:#!/bin/sh while
This is my Sina blog, with all the shells I wroteI wrote a lot of my own practice in the Sina blog Shell, I am going to write in 51, above is a hyperlink.(a) accept an input and replace the first letter of the input string.For example[Email
CCat Zdd Browse the contents of a ZDD fileCat Zdd1 Zdd2 Browsing the contents of multiple filesCat-n ZDD Browse the contents of a file Zdd and display line numbersCD back to the start directory, that is, just logged into the system directory, CD
The shell script is an operation of the basic skills of personnel, in peacetime work, in order to deal with some anomalies or query data, I often have to write shell scripts automated processing.Here to share a script I wrote to detect the status of
Bash and its featuresShell ShellGui:gnome KDE XfaceCli:shell CSH Ksh BashProgram, ProcessProcess: Each process appears to have only kernel and current processes present on the current hostA process is a copy of a program, and a process is a program
#1, print the usage of the mounted directory, the default is separated by a spacedf-ph | awk ' {print $5,$6} '#2, separated by a space, colon, \ t, semicolonAwk-f ' [: \ t;] ' ' {print '} '#3, Print lines 3rd through 5th in the 6.txt file, nr
Original link: http://www.361way.com/shell-eval-variable/4957.htmlNesting of variables is often used in the shell. For example, the value of a single or multiple variables as a variable name, and then the variable name to get its internal variables,
Problem: Change the ing_ in the picture name to 0.Current directory: $ lspic,change_name.shpic/|__kk1/|__img_001.jpg|__img_002.jpg|__vv2/|__img_005.jpg|__abc_002.jpgSolve:Write the following in change_name.sh:#!/usr/bin/env SHCD picDir= ' ls. 'For
Three types of quotes in the shellDouble quotation marks (""): the characters in double quotation marks, except $, "," and \ Nonalphanumeric, are interpreted as characters themselves.1 [email protected]:~#echo"$PATH"2 /usr/local/sbin:/usr/ Local/bin:
The shell itself is a program written in C, which is a bridge for users to use Linux. The shell is both a command language and a programming language. As a command language, it interprets and executes user-entered commands interactively, and as a
Shell Necklaceproblem DescriptionPerhaps the sea ' s definition of a shell is the pearl. However, in my view, a shell necklace with n beautiful shells contains the most sincere feeling for my best lover Arrietty , but even that's not enough.Suppose
First, what is the bean Shell
BeanShell is a scripting language that conforms fully to the Java syntax specification and has its own syntax and methods.
BeanShell is a loosely typed scripting language (this is similar to JS);
Previous JMeter Bean shell Use (a) a brief introduction of the bean shell in the next jmeter, this article is a supplement to the above, mainly summarizes the common scenarios and methods, I believe these basic can cover most of the needs. This
directly on the code.#!/bin/Bashno1=4NO2=5Echo "using let ..."Let result=no1+NO2Echo "result is: ${result}"Let result++Echo "result after 1 increment is: ${result}"Let result+=6Echo "result after 6 increment is: ${result}"Echo "using [] ..."result=$[
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