SCP implementation data copy other machine copy to local file: SCP [email protected]/ip:filepath localpath Local copy to other machine: SCP localpath [email PROTECTED]/IP: FilePath folder copy:scp-r [email protected]/ip:folderpath localpath Detailed
The Linux/shell command is primarily intended to address:1, check whether a port is occupied;2, check which process is occupied by a port;3. See which ports a process occupies;For example, my Tomcat failed to start, the log display port is occupied,
While deploying MS Exchange-I experienced issues with accessing the Exchange Management Shell and Exchange Toolbox. Whenever I tried to open the Exchange Management Shell I kept get the following error: verbose:connecting to
$0 execution name of the program$ N the nth parameter value of this program, n = 1 .. 9$ * All parameters of this program. This option can contain more than 9 parameters.$ # Number of parameters in this program$ PID of the Program (ID of the current
A point set is given to find the maximum Triangle Area of the vertex in the point set. We know that the three points of the Triangle must be on the convex hull. After finding the convex hull, we cannot enumerate it. Because N is a large question,
1. The system does not recognize the disk being inserted into Linux. When the device is restarted, let the system find the new disk: Echo "SCSI add_single_device 0 0 0 1 0">/proc/SCSI Remove the Added Disk: Echo "SCSI remove_single_device 0 0 0 1
1. Five methods for calculating the value:
(I ++ ))
Let I ++
I = $ (expr $ I + 1)
I = $ (echo $ I + 1 | BC)
I =$ (echo $ I 1 | awk '{printf $1 + $2 }')
2. The time command is used to
While do done, until do done (indefinite loop)
While [condition]
Until [condition] Do program section done
[[email protected] scripts]# vi sh13.sh#!/bin/bash# Program:#Repeat question until user input
1. How to perform arithmetic computation in Shell
A = 1; B = 2
(1) Let C = $ A + $ B
(2) c = $ [$ A + $ B]
(3) c =$ ($ A + $ B ))
(4) C = 'expr $ A + $ B '(note the spaces before and after the operators)
2. Test Method
[Expression]
If judgment
I have also written a simple shell script before, and it is not transferred to O & M. It has less work related to the system, so it is not very skilled.
Recently, as the system has encountered various messy problems and no one has helped
For how to use the function call in shell, see the following code example:
#!/bin/bash# value initExP="adb shell /data/local/tmp/vpxdec --yv12 --flipuv -t 2 --md5
Generally, we use tr to replace strings or delete specified strings.
The TR syntax is as follows:
Tr [Option]... set1 [set2]
-C,-C, -- Complement
First complement set1
Replace the characters not in set1 with set2
[[email protected] ~]$ echo
For Loop
1.
List for Loop
For variable in {list} # For each in C ++/CLR
Do
...
Done
For example:
1.
[[Email protected] TMP] # Cat B. Sh
#! /Bin/bash
For I in 1 2 3 4 5 #1 2 3 4 5 is equivalent to {1 .. 5}
Do
Echo $ I
Done
[[Email protected] TMP]
Variable
Local variable: similar to local variables, only valid for the current Shell Process
Environment variable: applicable to all sub-processes generated by login Processes
Location Parameter: used to pass parameters to shell scripts,
Introduction:In the previous article, the incremental data in Oracle10g is imported into hive0.13.1, and the master table in hive is updated. http://blog.csdn.net/u010967382/article/details/38735381 describes the principle of incremental update hive
[Copyright statement: reprinted. Please retain the Source: blog.csdn.net/gentleliu. Mail: shallnew at 163 dot com]
In most cases, the print statement of the awk can complete the task, but sometimes we need more. In those cases, awk provides two well-
The script is as follows:
#! /Bin/sh # Name of the process to be checked progress_name = "heihu_server" # ------------------------------- # function: checkprogress # function: Check whether a process exists # parameter: $1 --- Name of the process to
--- Today, the space is relatively small; only quotation marks are introduced.
There are three types of quotation marks in shell: Double quotation marks ", single quotation marks", and reverse quotation marks'1. Double quotation marks: A character
What is the difference between $ @ and $ * in shell learning?
Before talking about $ @ and $ *, you must start with the positional parameter of shell script...We all know how variables are defined and replaced.However, we also need to know that
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