Description
Cut press the column to split the file and you can specify the delimiters for each column. In cut terms, each column is a field, sometimes the first column, which may be described as the first field.
Actual combat:
Suppose there is a
RPM is a red Hat (REDHAT) package management tool that implements features like Add/Remove Programs in Windows
RPM-IVH install_rpm
Tar xvf Informix-linux.tar
Inux to extract the command Daquan
. tarUnpack: Tar xvf Filename.tarPacking: Tar cvf
This article to introduce you to the very detailed, specific details please see below.
Start the installation modify the/etc/inittab file first:
Id:5:initdefault:
To
Id:3:initdefault:
#vi/etc/inittab
and restart the computer.
The system
Get the number of rows in a single file
File: test1.sh
Number of rows: 20
Method One
Copy Code code as follows:
awk ' {print NR} ' test1.sh|tail-n1
As shown in the figure:
Method Two
Copy Code code as follows:
First, topsy variables and environment variables
Variables are an essential part of any programming language and are used to hold variables of various types. Scripting languages are mostly weakly typed languages (dynamic languages), which means
An error occurred while executing the script in Ubuntu system "Source command not found in sh shell"This is actually a script that executes in Ubuntu by default with dash, not bashby command#LS -l 'whichsh/bin/sh --dashWe found that the SH used by
Shell basic applications and examplesOne$# the number of arguments to the script$* displays all parameters passed to the script in a single string. Unlike positional variables, this option parameter can be more than 9$$ the current process ID number
Install the Ansible batch management system. (No, SSH remote command loop is also possible)
Create a new table in a common database, using the information you want to collect as a column name, and provide the ability to insert with the shell.
Shell script Programming-case OneProgramming Requirements:1. Create a Vm-ctl script, under/bin/2. Implement features: Create a virtual machine, create a virtual machine snapshot, turn on a virtual machine, display a virtual machine, stop a virtual
IntroducedFind命令的工作方式:沿着文件层次结构向下遍历,匹配符合条件的文件,并执行相应的操作。Options-print: Indicates the file name (path) to print out the matching file. When using-print, ' \ n ' as the delimiter used to separate files-print0: Indicates that each matching file name is
Shell substitution operators and pattern matching operatorsSubstitution operators:(1) ${varname:-word}: If varname exists and is not NULL, its value is returned, otherwise, word is returned.(2) ${varname:=word}: If varname exists and is not NULL,
SelectThe Select loop is used primarily to create menus, the menu items in numerical order are displayed on standard errors, and a PS3 prompt is displayed, waiting for the user's input, the user enters a number in the menu list, executes the
Parameters:-N does not execute script, only checks syntax for errors-V Output the script contents to the screen and execute the script-X executes the script and outputs the content to the screen-N-VTen module () { eval '/usr/bin/modulecmd bash $*'}#
Shell script Programming "on"A program is a combination of instructions and data.Program Programming Style:Program: command-centric, data-serving instructionImage: Data-centric, command-serving dataProgramming Languages:Low Level:
1. What is the difference between sed and awk?(1) Awk: Operations by column (domain); sed: line by row(2) awk: Text processing language, suitable for extracting text; SED: non-interactive editor for editing text2. Which parameter does awk use as a
Transferred from: http://my.oschina.net/u/189445/blog/595232Two months ago used HBase, now the most basic commands are forgotten, leave a reference ~
HBase shell command
Describe
Alter
Modify Column family
What is a shell script?A shell script is a text file that contains one or more commands.As a system administrator, we often need to use multiple commands to accomplish a task, and we can add these commands in a text file (shell script) to accomplish
One, arrayarray: is a data structure,data series, continuous multiple data, can be used to get related elements of the indexDeclaring an array:Declare-a arrayname # can not be declared in advanceInitialization assignment:arrayname= ("STRING1"
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