The awk function split (S,A,SEP) splits a string s into a awk array a using the delimiter Sep.
Set time = 12:34:56Set hr = ' echo $time | awk ' {split ($0,a, ":"); Print a[1]} ' # = 12Set sec = ' echo $time | awk ' {split ($0,a, ":"); Print A[3]} '
The code is as follows:
@echo off
Setlocal enableextensions
Echo%time%
Call:P Rocdelay 200
Echo%time%
Goto:start
:P Rocdelay delaymsec_
Setlocal enableextensions
for/f "Tokens=1-4 delims=:."%%h in ("%time%") do set Start_=%%h%%i%%j%%k
:
1, the use of ping command to realize the delay, the method is clever and can be controlled, but the accuracy is not high. such as: Ping-n 3 127.0.0.1>nul approximately can pause 2 secondsThe number after-n is the number of packets sent, plus one
I checked it online. First, the sleep series (sleepusleepnanosleeptime_sleep_until) functions. First, these functions have a problem. sleep is suspended by the current process, for example: {code ...} in fact, after [wait for 10 seconds], [and at
For example, in the system date, the value of the environment variable is .- -- atSaturday years------%date:~0,4%Indicates that the left-to- right pointer is 0-bit to the right, and then the 4-bit character is extracted from the pointer offset
Go online Check, first is the Sleep series (sleep/usleep/nanosleep/time_sleep_until) function, first of these functions have a problem, sleep is the current process hangs, such as:
echo time();sleep(10);echo time();
In fact, " wait for 10 seconds ",
Oh, the problem with the format of the time, the last two characters are milliseconds, most people do not use this, a few minutes a few seconds of the format is a bit more, so this is used to remove the last three characters, the preceding 0 means
Oh, this is due to the time format problem. The last two characters are in milliseconds, which is not needed by ordinary people. The format is a bit more than a few minutes or seconds, therefore, this is used to remove the last three characters. The
Yesterday a PGP encryption disk broke, everything lost ... , My notes! How can I be 2?Back up a script, convenient for later mobile phone view, saying I almost forgot the account passwordNote: footstep recovery can only be restored to the state
Linux Shell gets time and time interval (MS level)Note: While performing some performance testing, sometimes we want to calculate the time a program runs, and sometimes it is possible to write a shell script to facilitate some performance test
The code is as follows
Copy Code
The collection of two arrays$arr 1 = Array (' A ', ' B ', ' C ', ' d ', ' e ', ' f ');$arr 2 = Array (' A ', ' a ', ' e ', ' A ', ' P ', ' a ', ' a ', ' e ');$arr 2 = Array (' A ', ' a ', ' a ', ' a ')
PHPIFELSE simplifies the use of the trigger once. Generally, we write the following code :? If ($ _ GET [time] null) {$ timetime ();} else {$ time $ _ GET [time];} echo $ time; if GET has the value of time, the variable is generally written as
Oracle ora-12541:tns: No ListenerTags: Oracle DataBase
Today, using the Oracle database, using the Visual connection tool to connect to the database of the test environment prompt no listener, and finally with the help of the teacher finally
First, the introduction of common plug-insGets the connection status of the specified port established, close_wait, listen, etc.Tcpconns:Listeningports falseLocalPort "80"RemotePort "80"Get the status of NginxNginx:URL
One, batch file Update.batSet up an instance of SQL ServerMake sure to configure the logfile file@echo off:: # # # # # B. on Database Schema Update forB. on -B. Geneva -B.Geneva ####SetLOGFILE="D:\Forklift\B01_B02toB03_Schema_Update.Log"::
In the development process, the need to constantly back up database objects, especially stored procedures, each time the manual backup is very low-energy AHAfter several modifications finally, perfect, O (∩_∩) o haha ~ (of course, you can also
1, compare the size of two datesCompare the size of two dates, first by converting the date to a timestamp, and then comparing the timestamp.The sample code is as follows:$time 1=date ("y-m-d h:i:s");$time 2="2009-12-9 4:40:12";Echo "Time variable \
Note: When performing some performance tests, we sometimes want to calculateProgramSometimes, you may write a shell script to control the performance test (for example, you want to run n times to obtain the average value). In short, one of these
Question 1: Is time () always the timestamp of the current time zone obtained by time? Whether or not the time zone is set. PHPcode // I wrote two test pages. The two pages get the same value: //. php: echotime (); // B. phpdate_defa
1. is time ()
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.