First, the demand original file a for 1.7g file, with 5 1700 Mangyo look. There are also 2 auxiliary files b and C, b c files are only 2 column. a1 and b1 same, A2 and C1 a1 B2, c2" a4 a5, the target file is named d.txtSecond,
1:declare commandshell Default is String typeIf subtraction is required, it needs to be defined as an integral typeDECLARE command: Change the default variable type Decalre [+/-] [option] Variable name-set type properties for variables+ Cancel
Directory:First, the operation Principle of shell programSecond, Shell common skills1. Command history2. Command aliases3. Command Reference4. File name Wildcard5. Common shortcut keys6. Complement function7. Input and output redirection and piping8.
When the shell executes a command, it returns a return value that is saved in the shell variable $? In When $? = = 0 o'clock, indicating successful execution; = = 1 o'clock, which indicates that the execution failed. www.2cto.com Sometimes the
1.cdCD-Back to last catalogCD returns the current user's home directory2.mkdirMkdir-p Creating a multilevel directoryEg:mkdir-p Test1/test2/test33.findFind-empty Finding empty DocumentsFind-user XXX View all information about user xxxFind-mtime-1
Because I usually write some small experimental script, every time to write author,description and so very troublesome, then wrote such a script can create their own small script, code as follows, pure personal original, relatively rough, big God
List the number of connections per IPawk ' /^tcp/{print} ' awk ' !/^::/{print $ {} ' Sort Uniq Sort awk ' begin{printf "%-10s%s\n", "Connum", "IP"}{printf "%-10s%s\n", $1,$2} 'Command explanation:
Netstat-n refused to display aliases, can
1. Describe the operation principle of shell program (can be attached with necessary graphic instructions);2, summarize all the knowledge points involved in shell programming (such as: variables, grammar, command status, etc., to take the picture of
character
meaning
*
Match 0 or more characters
?
Match any one character
[list]
Match any single character in the list
[!list]
Matches a character other
Introduction:The previous article, Sqoop1.4.4, implements the import of incremental data from oracle10g into Hive0.13.1 and updates the primary table http://www.linuxidc.com/Linux/2014-09/106282 in hive. The HTM describes the principle of
First, use '. ' Perform1. Contents of the file:a.sh#!/bin/sha=2echo a= $ab.sh#!/bin/sh./a.shecho a.sh:a= $a2. Add executable permissions# chmod +x a.sh b.sh3. Running#./b.sh a=2a.sh:a=It can be seen that a in b.sh does not get the A variable in a.sh,
1. If while command is written in one lineWhile read a b;do echo $a $b;d one 12 13 14Cat Aa.txt12 13 14if [[$i-eq 0 | | $i-eq 2]]; then env=10.79.40.146:80; else env=10.79.40.147:80; Fi2. Awk merges two filesAccount CdrCat AccountZhang San
#!/bin/sh# Licensed to the Apache software Foundation (ASF) under one or more# Contributor license agreements. See the NOTICE file distributed with# This work for additional information regarding copyright ownership.# The ASF licenses this file to
PS: Only consider the latest version of Scala and python2.x, due to the difference between python3.x and python2.x, and the mainstream of some open source projects are used Python2, currently python2 a little bit compatible python31.
This article is intended to review the definition and assignment of arrays in shell script programming, to read arrays, and to get the length of an arrayKnowledge Reserve
Array : Multiple contiguous separate memory spaces, each memory
PackageCom.edu.hpu.sort.insert.shell;Importjava.util.Arrays;ImportCom.edu.hpu.sort.Sort; Public classShellsortextendsSort {@Override Public int[] Dosort (int[] arr) { intLen =arr.length; //all step probabilities (for the first half of the
Multi-thread Linux Shell script and linuxshell
In bash, we run (&) in the background to implement multithreading.
for((i=1;i
We have added {} & so that the execution in {} can be performed in the background. The above is equivalent to executing
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.