Sed and awk are powerful text filtering tools in the UNIX environment.
With SED and awk, it is easy to edit local files, and it is easier to use regular expressions to filter out the output of other commands.
SED represents the stream Editor,
[]linux Shell gets the absolute path of the currently executing script
A common misconception is to use the PWD command, which is "Print name of current/working directory," which is what this command really means, the current working directory,
#man Date can see the Help file for date#date Get the current time#date-D " -1week" +%y%m%d access to the Sunday period (day,month,year,hour)#date--date= " -24 hour" +%y%m%d dittodate_now= ' date+%s ' shell script assigns variable values%%% OUTPUT%
Purpose Description
In executing the Linux command, we can redirect the output to the file, such as LS >a.txt, then we can't see the output, if we want to save the output to the file, but also want to see the output on the screen, we can use the
Java EE Development of various types of resources download list, the history of the most complete IT resources, personal collection summary.
Objective:
No matter what programming language is inseparable from conditional judgment. The shell is no
Many people use the simple SSH connection tool, sometimes need to copy files in SSH to the local view more convenient, I would introduce a simple command of the SCP.The SCP is a security file copy, based on SSH login.Easy to operate, such as to the
A lot of people are learning C + + language First, then learn shell script. If you have a little programming base, it's easy to understand the so-called order, selection, and loop. Order structure In fact, there is nothing to say, before the contact
This article, as the last article in the Shell script Base series, does an exercise here. How to use a For loop to execute a command.
1. Use for loop to execute different commands
2.for loop Plus if statement print file
Put the script file
IFS:
The use of IFS directly to explain what the specific ifs is doing ... Own Google
First create a file of "a", and "a":
Then we look at the LS:
--> ls
a A a That is true.
And then if we need to write a script to manipulate each file:
--> for
Turn from: http://my.oschina.net/u/189445/blog/595232
HBase shell command
Describe
Alter
Modify Column family (family) mode
Count
Number of rows in the statistics table
Create
Create a
First, Introduction
Regular expressions are commonly used in many of the tools and commands in the shell, and understanding basic regular expressions and extending the meaning and usage of metacharacters in regular expressions is good for skilled
The shell is used to solve the problem of how users communicate with the operating system. In fact, we all have a misunderstanding of the concept of shell, as if the command line shell is called shell. The shell, in fact, is the shell. As
echo Outputecho instruction for the output of a stringFormat: Echo stringDirect output String: stringEcho ' This is String-output 'In double quotes, you can also omit quotes here.Escape character: \echo ' \ ' It is ok\ 'Variable: \valueEcho ' \value
I use the Mac is when you start a Python port process, even if it is turned off, the background process is still present, the process of initiating the same port, or the error prompt has been occupiedWhen you lsof-i: the port number (linux--(SS-ANPT
20.5 logical judgments in shell scriptsYou should use a variable instead when you use a string more frequently in your script and the string length is longWhen using conditional statements, variables are often used?? If [$a-gt 1]; Then ...; FiWhen
# #思路1Use awk to isolate the IP to 4 segments and then invoke it through a for loop#!/bin/bashSTART_IP="192.168.2.1"j=1for i in `echo $START_IP|awk -F. ‘{print $1,$2,$3,$4}‘`do eval IP$j=$i echo "$IP"$j"" The main difficulty of this idea1.
[-A file] is true if file exists.[-B file] True if file exists and is a block special file.[-C file] True if file exists and is a word special.[-D file] True if file exists and is a directory.[-E File] True if file exists.[-F file] True if file
Shell scripts are important for Linux system administrators and O & M personnel. I recently read the shell script. In order to systematically learn the shell script, I read the third edition of "laruence's Linux basic learning for Private food,
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