The SED editor processes the file line by row and prints the output to the screen. The SED command reads the currently processed rows into the mode space (pattern spaces) for processing. When SED finishes all the commands on the line and prints the
Infiltration using OPENROWSET to engage the shell
Get the SQL injection point, the first thought is backup Webshell, throw in NB run a lap, found that blocked the SQL error messages, not the physical path, that also wrote a PP horse.
Associated with
There are two ways to execute shell commands under Linux
Executing shell commands in the current shell
Generates a subshell in the current shell, executing shell commands in Subshell
1. Executing shell commands in the current shell
First, compression and decompression
1, compress [-RCV] file or directory
uncompress files. Z
-R: Can be compressed together with the files in the directory
-C: Export compressed data to standard output (output to screen)
-V: Can display the
Today's case is the decision to input to the user
#!/bin/sh # validint-validates integer input, allowing negative ints. function Validint {# Validate field. Then Test against Min value $ and/or # max value $ if they are supplied.
If They
Today is about deciding whether the date entered is correct, and using the function in the example 03 before us is code
#!/bin/sh # valid-date-Validates a date, taking into account leap year rules. Exceedsdaysinmonth () {Case $ (echo $1|tr '
Objective
Here does not introduce git, table a see the command line is afraid, commonly used commands are these, basically meet more than 99% of the project needs, very practical.
Body
First, Common git command
1.1 Git clone []
From remote
Sometimes we need to repeat the previous commands in Bash. You can, of course, use the UP ARROW keys to view the commands you've run before. But there are some better ways, for example, to master the following shortcuts.
1)!! : Repeat the previous
According to the smart principle I set goals for 2016 years. Each month has a small goal, each of which is specific (specific), measurable (measurable), attainable (achievable), relevant (relevance), Time-bound (time limit). The January goal was to
One, single branch if statement
Format: if judge condition; then
Statement1
statement2 ...
Fi
Two, two-branched if statement
Format: if judgment condition; Then
Statement1
statement2 ...
else
statementn
...
Fi
Use a
Objectivea problem has been encountered at work today, if you copy the files from directory A to directory B (without the file in directory B) and keep the files in directory A. The focus of the project is as follows:
You need to keep the structure
Use here documentation
Copy Code code as follows:
#!/bin/sh
FTP-IVN 210.29.28.124 User Yun yun2011
Lcd/home/veyun
Cd/home/veyun/yhb
Get V
Bye
Eof
Explain:
-I: Turns off interactive prompts during multiple file transfers, so
I am also a novice, write a bit old-fashioned, right when practicing, for beginners friends reference it.
Copy Code code as follows:
#!/bin/bash
If [$SUCC _ping-gt $ ((ping_count-1))];then
If [F./alarm_file/alarm_$host];then
Download a single file and print the output to standard output (STDOUT) by default
Curl http://www.centos.org
Save the downloaded file to the specified file by using the-o/-o option:
-O: Save the file as a file name specified in the
Various points of knowledge are written in the notes.
Only need sudo $PATH/ftpsetup.sh, default to test/test for user name password login, after the root directory read-only, subdirectory writable writable.
Test OK on Ubuntu 13 and Linux Mint 15.
centos6.0 is installed, many packages are not installed because a minimal installation is selected, so some commonly used commands are not supported, as follows:# SCP-bash:scp:command not found
My solution is to find the package on the SCP on a
Often see commands like the following in blogs or forums the curly braces extend brace expansion {} Shell functions
Cp/etc/httpd/httpd. {,. Bakup}
Or is
MV Resume{z,}.doc
So what does it mean in the uinx/linux shell
In Java,python, you can use the import method to make calls between scripts or modules, for example:
Copy Code code as follows:
>>> Import Math
>>> Math.sqrt (4)
2.0
How do you invoke other shell scripts in the shell, or
Write this blog before, I Google a bunch of related articles, mostly said to modify/etc/sudoers, and then nopasswd: designated CMD, but really no use, no remote virtual terminal This method is cloud, ubuntu10.04 Server Pro-Test!!
Remote operation
1. Document CollationWork number and name are recorded in the employee fileEmployee.txt:Jason SmithJohn DoeSanjay GuptaAshok SharmaRecord work number and salary in bonus fileBonus.txt:100 $5,000200300 $3,000400 $1,250Requires merging two files and
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.