The way to get timestamps in the shell is: date-d "$currentTime" +%s
If you want to convert a date to a timestamp, you would do the following:
1. Get the current time
Currenttime= ' Date ' +%y-%m-%d%h:%m:%s '
2. Convert date to time stamp
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
A regular expression and wildcard characters
1 A regular expression is a string that matches the criteria in a file, and a positive one contains a match, and grep,awk,sed commands can support regular expressions
The 2 wildcard is used to match the
This shell is to determine if the number entered is a reasonable float
The implementation code is as follows:
#!/bin/sh # Validfloat-Tests Whether a number is a valid floating-point value.
# This script cannot accept scientific (1.304E5)
I have a limited memory, the usual Linux encountered in the project to share the common commands to everyone.
Linux Common commands complete http://www.jb51.net/linux/
^m exists in Linux filesThe use of shell command TR can be achieved by removing
Objectiveor do you write an automated packaging script today that takes you to get the last file name from the path name. Here is a record of the implementation process. Of course, in the end I will also give the official practice. (PS: Very awkward,
Most people use grep to find the specified process in the PS aux output when they write the shell filtering process, but they also display the grep process, such as finding the pptpd process, which matches two:
Copy Code code as follows:
1. Print some header informationCommand ............Dilimiter
The standard input of the command as the content of the boundary symbol DilimiterCommonly used in the echo command, this avoids the need to use an echo command without outputting a line,
The 2nd generation Linux operating system in the installation of software is quite simple: the first step, search for the software you want, such as you want to find a game software, its name is called Myward, the Game Software description is: Myown
First, through the timing of email to detect network connectivity
Copy Code code as follows:
#/bin/bash
echo "Daily Test mail" > State.txt
Mail-s Server_state Abc@jb51.net Rm-df./state.txt
~
Crontab-e
Add the following
First of all, let's look at the problem description, the following figure is my run-time error screenshot:
Solving method
Analyze the reason, maybe because I have a problem with my platform migration, we have permission to convert.
1 conversion
There are many examples of shell script-reading text files on the web, but they don't tell the whole story, only half of it. For example, read a text line from a testfile file in the following format:
Copy Code code as follows:
$ VI
Original file:Find/etc-name passwd 2>&1 | Tee Ee.log1. Cat-n The document contents of the E.log with the line number and enter E2.log in this document:[Email protected] ~/t2scripts $ cat-n E.log |Tee E2.log1/etc/passwd2 3 4Find:
Previous JMeter Bean shell Use (a) a brief introduction of the bean shell in the next jmeter, this article is a supplement to the above, mainly summarizes the common scenarios and methods, I believe these basic can cover most of the needs. This
1. Shell Overview1.1 Shell Introduction(1) The shell is a command-line interpreter that provides users with an interface system-level program that sends a request to the Linux kernel to run the program, allowing the user to start, suspend, stop, or
12. Sort commands for Rowssort:1. Sort command-line options:
Options
Describe
-T
Separators between fields
-F
Ignore case when sorting based on character
-K
Define
Seven. grep family: 1. grep exit Status: 0: Indicates success; 1: Indicates that a matching pattern could not be found in the supplied file; 2: Indicates that the file provided in the parameter does not exist. See the example below: /> grep '
A few commandsThe script is based on the preceding log format. If your log format is different, you need to adjust the parameters following the awk.Analyze the UserAgent in the log The code is as follows:Copy code Cat access_20130704.log | awk-F
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