In Lua, Os.execute can execute DOS commands, but returns the system status code, which is the default output.Io.popen () can also execute DOS commands, but returns a file. egCopy the Code code as follows:Local T = Io.popen (' svn help ')Local A =
Add the appropriate user account to the Linux service and the initial password is "123456". You can specify a list file for all users, and then write a script named uadduser.sh.[[email protected] ~]# vim/root/users.txt //Create a new list file that
-eq equals, such as: if ["$a"-eq "$b"]-ne not equal to, such as: if ["$a"-ne "$b"]-GT greater than, such as: if ["$a"-gt "$b"]-ge greater than equals, such as: if ["$a"-ge "$b"]-lt less than, such as: if ["$a"-lt "$b"]-le less than equals, such as:
Create a two shell script file. The test1.sh code is as follows:#!/bin/bashurl= "Http://www.cnblogs.com/freescience"The test2.sh code is as follows:#!/bin/bash# use. To reference the test1.sh file. ./test1.sh# or use the following include file code #
Built-in judgment, when successful returns 0, does not successfully return nonzeroTest-judging expression[Judgment expression] Note must be left blank before and afterNumeric operations-eq equals-ne Not equal to-GT Greater than-ge greater than or
Want to write a script, found that all forget, egg pain, while recalling the side of the writing, finally finished, affixed to the following:1#!/bin/Bash2 #Program:3 # can help you quickly redeploy the project4 #History:5# ./ ,/TenShichaogeng First
1. Direct to the code: I am this is two programs. Most likely to write a function[email protected] src]# cat checkprocess.sh#!/bin/bashCheckprocess (){Ps-ef|grep $1|grep-v grepIf [$?! = 0];thenSystemctl Start $Elseecho "It ' s
1, get the character from the front 8, the implementation method is as follows:a=123456789$ expr substr $a 1 8$ echo $a |cut-c 1-8echo $$ echo $a |dd Bs=1 count=8 2>/dev/null2. Interception by the specified string(1) The first method:A string after
/etc/shells more/etc/shells/bin/sh/bin/bash/sbin/nologin/usr/bin/sh/ usr/bin/bash/usr/sbin/nologin/bin/tcsh/bin/cshECHO-E Related escape character\ \ input \\a Output Warning tone\b Backspace, i.e. delete one character to the left\c Remove line
Overview of the SED tools (streaming editor)Non-interactive, filter and modify text based on pattern matchingLine by row and output the results to the screencan achieve the output of the text, increase, delete, change, check and other operationsSed
1. Generate files of any sizeif=/dev/zero of=junk.data bs=1m count=1recorded 1+0 read- inrecorded the writing of 1+0.1048576 bytes (1.0 MB) copied,0.00219263 sec,478 MB / secIf represents the input file, The of is the output file,the BS size,
Echo ' $ Get the file name of the currently executing shell script: ' $Echo ' $n gets the nth parameter value of the currently executing shell script: ' $ ' =$1 ' $ =$2 ' $ ' =$3Echo ' $* gets all the parameters of the currently executing shell
2017-08-021.$0 gets the name or full path of the current scriptCat Name.shlinux Shellsh Name.shecho $0name.sh2. $n (n >=1) get the script nth parameter note the usage of n>9 ${n}Example: SH name.sh aa bb cc dd EEecho $ $4 $ ${20}Output: AA bb cc dd
Https://stackoverflow.com/questions/91110/how-to-match-a-single-quote-in-sedToday is looking at an example of sed '/larry\ 's ' Larry. The results are not matched. Google is not aware of the query. Matching single quotation marks cannot be simply
The previously installed directory on OpenFire encountered this problem, and today again. You need to change all subdirectories below a directory and the three permissions of the file: the user reads and writes. The administrator reads and writes.
The code is as follows:public class Shellsort {public static void Sellsort (Datawrap [] data) {System.out.println ("start sort:"); int length = Data.lengt The h;//h variable holds the variable increment int h = 1;//The maximum value of the increment
In the insert sort, all elements are compared to the previous element, and the position is replaced. So the number of exchanges is the square level of N. In extreme cases, if the smallest element is on the far right, you need to displace each and
1. In Ubuntu, install SSH:sudo apt-get update # to complete system updatescd/etc/init.d/# See if SSH service is installedsudo apt-get install Openssh-server # for installationsudo etc/init.d/ssh Restart # Restart service, others are:
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