Before I published "Hadoop, kill chicken with sledgehammer, Python+shell to achieve the general log file query, statistics , "theneed to combine python, there may be a certain threshold, now the shell part stripping out. For example, some of the
The Cut command extracts text columns from a text file or text stream.Cut grammar[[email protected] ~]# cut-d ' delimited characters '-f fields [[email protected] ~]# cut-c character range Options and Parameters:-D: followed by delimited characters.
Shell First lesson study notes
What do you mean shell?The shell is a command interpreter that, at the outermost layer of the operating system, is responsible for directly talking to the user, explaining the commands entered by the user to
Long time no shell, hehe#!/usr/bin/EnvBashcounter=1 while[$COUNTER-lt + ]; DoEchoThe counter is $COUNTERCat>Tmp.sqlinsert into"Wcdata"VALUES ('' (printf "%03d" $COUNTER) '','0.00','0.00','0.00183','85.47943','4773267.7216','-10669.18'); EOFEchoThe
How to use the ①$ notation: (Excerpt from-network)The execution name of this program$n the nth parameter value of this program, n=1..9$* all parameters of this program, this option can have more than 9 parameters.$# the number of parameters for this
Quickly jump to a specific directory in the shellOn the computer to put the project code unified into a directory "~/code", often need to jump from other directories to the code directory, always enter the directory is more trouble, and then think
installation and use of the Shell encryption tool SHC1) Tool DescriptionShell scripts are read-write and are likely to leak sensitive information, such as username/password/path/IP. It also leaks sensitive information while the shell script is
Awk:gsub Replacement NETSTAT-TNPL | Gawk ' $NF ~/\/mongod$/{gsub (/.+:/, "", $4);p rint $4} ' |sort-n to replace all $4: End with empty shell array ${#ports [@]} #得出数组长度 ${ports[@]} = ${p Orts[*]} to derive the array value ${ports[@]:8} to get the
Programming on Linux, without the shell, plan to take a good look at Shell programming, and make notes here to share with people of the same interest, primarily in the Shell Scripting Learning Guide.Before you learn shell scripting, you need to
The bash shell itself does not support regular expressions, and the use of regular expressions is shell commands and tools such as grep, SED, awk, and so on;However, thebash shell can use some metacharacters in the regular expression to implement
#! /bin/bash (the declaration of theLinux scripting environment is the interpreter, which is bash, under the bin directory in the root directory )Definition and assignment of variables:Format: Variable name = variable value ( No need to declare
Like other languages, the Shell can also contain external scripts that merge the contents of the external script into the current script.The Shell contains scripts that can be used:
. FileName
Or
SOURCE filename
The
The following are personal understandings and are for informational purposes only.First, IntroductionHBase is a column-oriented distributed database developed on HDFS that is suitable for random read/write ultra-large data sets (often difficult to
Lines that begin with "#" are comments, which are ignored by the interpreter.There is no multiline comment in sh, only one # is added to each line. Can only be like this:
#--------------------------------------------
# This is a
Wildcard characters:The so-called wildcard, refers to the time a file name style, can be used to compare the file name to find the matching files.*: Represents an arbitrary string, which can be an empty string? : Represents a character, but cannot
SortSort operations, which are sorted according to a set of rules for one or more rows in a file. Output to standard output and is not saved to any file.-t specifies the filed delimiter. By default, spaces are specified, and multiple spaces
The shell executes the jar program and manually configures the JDK environment that executes the jar, executing the script as:#!/bin/shexport java_home=/home/hadoop/szw/jdk1.8.0_25 Export path= $JAVA _home/bin: $JAVA _home/jre/bin: $PATHecho ' Date '
First, take an integer less than n D1 as the first increment, dividing all the records of the file into D1 groups. All records that are multiples of the DL are placed in the same group. The direct insert sort is performed in each group first, then
Gzexe encrypts shell scripts 01, gzexeshell
Gzexe encrypts shell scripts 01
I. Introduction
Most of the time, our script involves some private information, such as the user name, password, or other important information. We use some encryption
Gzexe encrypts shell scripts 01
Gzexe encrypts shell scripts 01
I. Introduction
Most of the time, our script involves some private information, such as the user name, password, or other important information. We use some encryption methods to block
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