(From: http://www.et8.net/bbs/showthread.php? T = 763159)Run as service-use any executable file (including batch processing and badge) as a tool for running system services
Features
Run any executable file as a system service.
It is mainly used to port some Linux daemon; it can also be used to start any application.Pr
{"Password:" {send "$P \ r"}}Expect "*$" #普通用户是 $,root user is #Send "exit\r"Expect EOFEOF #expect语句结束 Done #shell的for循环结束. You can test the script syntax for errors with the Shell-n script file name in the process againshell-x The script name to view the execution process if the script has an error . will show up directly. Every step is very detailed. Easy to troubleshoot errorsThis article is from "Deser
{"Password:" {send "$P \ r"}}Expect "*$" #普通用户是 $,root user is #Send "exit\r"Expect EOFEOF #expect语句结束 Done #shell的for循环结束. You can test the script syntax for errors with the Shell-n script file name in the process againshell-x The script name to view the execution process if the script has an error . will show up directly. Every step is very detailed. Easy to troubleshoot errorsThis article is from "Deser
{"Password:" {send "$P \ r"}}Expect "*$" #普通用户是 $,root user is #Send "exit\r"Expect EOFEOF #expect语句结束 Done #shell的for循环结束. You can test the script syntax for errors with the Shell-n script file name in the process againshell-x The script name to view the execution process if the script has an error . will show up directly. Every step is very detailed. Easy to troubleshoot errorsThis article is from "Deser
In text operations, you can often find, replace, and rename the entire file. in Linux, it is quite convenient. In Windows, you need to use special tools. The following are some simple methods in Linux, which are successfully debugged in ubuntu9.10.
1. RENAME command is used for batch renaming
Rename Syntax:
RENAME [-V] [-N] [-F] perlexpr [files]
-V indicates
running independently. Achieve the goal of multi-threaded, the following to resolve the execution of the command list. Give an example of a probe port. The network administrator wants the multi-threaded command to perform port validation simultaneously. Store all commands in the file Cmdlist.txt The Cmdlist.txt file code is as follows: Telnet 10.1.1.1 22 Telnet 10.1.1.1 80 Telnet 10.1.1.1 443 Telnet 10.1.
Q:
How can I compile a. Net project through command line?
A:
Use devenv.com installed with Visual Studio and add the following parameters to compile. Net:
C: \ Program Files \ Microsoft Visual Studio 8 \ common7 \ ide \ devenv.com D: \ projects \ yourproject. csproj/rebuild "release"
Of course, you can also compile a batch file to compile the. NET solution (. sln), as shown below:
PATH %; C: \ Progr
Use shell batch to change file suffix names
There are times when you need to change the log files in the server to a different uniform format, and it's a good idea to use your scripts automatically. In this paper, the JPEG format file is changed to JPG format as an example.
Script to create 10 files, with JPEG as the suffix, the code is as follows:
#!/bin/sh f
Directly on the code:@EchoOffsetlocalsetlocalEnabledelayedexpansionSetPath= "C:\Users\llq\Desktop\test"Setsuf= "*.doc"rem%path% #使用变量 for/F "delims="%%i inch(‘dir/b/s/a-d%path%\%suf%‘) Do(SetH= "%%~Ni for %%j inch(a b c d e F g h i j k l m n o p q R S t u v w x y z) Do SetH= "!h:%%j=%%j!"Ren"%%i" "!h!"%suf%)endlocalNote:About the syntax in the code, do not understand can see my other cmd command syntax, or
Windows cmd batch processing changes the file name to lowercase and cmd to lowercase
Directly run the Code:
@ Echo off setlocalsetlocal ENABLEDELAYEDEXPANSIONset path = "C: \ Users \ llq \ Desktop \ test" set suf = "*. doc "rem % path % # use variable for/f" delims = "% I in ('dir/B/s/a-d % path % \ % suf % ') do (set h = "% ~ Ni "for % j in (a B c d e f g h I j k l m n o p q r s t u v w x y z) do set h
Today I would like to implement a batch of changes in the file suffix, search a lot.Reference article: http://blog.csdn.net/longxibendi/article/details/6387732Converts the. c file in the current directory into the. h suffix.
Rename ' s//.c//.h/' ./*
The result is always an error at run time:
Syntax error at (eval 1
use the For loop to bulk create 10 HTML files in the/oldboy directory, where each file needs to contain 10 random lowercase characters plus a fixed string oldboy, with the following name examples:[[email protected]]# ls/oldboyapquvdpqbk_oldboy.html mpyogpsmwj_oldboy.html txynzwofgg_oldboy.htmlbmqiwhfpgv_oldboy.html mtrzobsprf_oldboy.html vjxmlflawa_oldboy.htmlJhjdcjnjxc_oldboy.html qeztkkmewn_oldboy.htmlJpv
' Batch file Auto search replace insert Ver2.1
' Feiyun wrote, CSDN account: jspadmin,qq:33323489
' Personal website http://www.pifoo.com 蚍蜉 Chinese Station, Welcome to exchange links. This site provides free blog application registration.
' You can use or modify this code, but please keep the copyright information or links, thank you for using!
' If you have any questions or suggestions, please leave me a
Tags: BAT window batch fileRecently, a software I used requires a large number of environment variables, and I do not want to add these variables to the system environment variables, on the one hand, because there are different versions of database files with the same name, they will interfere with each other when written in the system environment; on the other hand, most of the paths are only required in this software, therefore, it is most appropria
(up_count); return false ;}}}); // alert ('upload takes some time. Please wait until the prompt box is displayed successfully! ');})
The above is the code for asynchronous file upload. However, the plug-in is based on jquery components and requires support from jquery, but not in some versions, if you find an error such as "handleError", please click to download this plug-in to overwrite
Ajax asynchronous batch
Recently need to remove the duplicate content, so I thought of using bat or VBS implementation, did not expect to have been written on the internet, testing is just learning
How to: Drag the text onto the batch process ...
@echo
off:: Code by oicu#lsxk.org 2007/11/29
rem chcp 437>nul
:: See Use, UTF-8 encoded files can not be less chcp command, generally no use, :
: But utf-16 files are not supported regardless of whether they are in use or
Today suddenly think of a problem has not hands-on practice, is the use of Shell batch modification file suffix, now hands-on practice.
Requirements: The home directory has some SQL files, want to bulk renamed into TXT
1, find + xargs +sed
Copy Code code as follows:
Find/root-name ' *.sql ' |xargs-i echo {} {} |sed ' S/sql/txt/2′|xargs mv
find/root/-name ' *.sql ' |sed-e ' s/\ (. *\).
+ matches with a G beginning, and at least one character after theString *--matches 0 or more characters, such as ". *" to match any string | --Logical "or", unlike [or], it only matches strings, for example (X|y) matches x or y \--escape characters. You can escape the opening parenthesis (the sharp character ^ dollar sign $ exclamation point!). asterisk * Pipe symbol | closing parenthesis) etc. --Escape is a dot character (a dot regular the expression can match any character)/*--0 or more forwa
at least one arbitrary character, for example g+ matches a string that starts with G and has at least one character followed by *--matches 0 or more characters, such as ". *" to match any string | --Logical "or", unlike [or], it only matches strings, for example (X|y) matches x or y \--escape characters. You can escape the opening parenthesis (the sharp character ^ dollar sign $ exclamation point!). asterisk * Pipe symbol | closing parenthesis) etc. \. --Escaped as dot character (dot regula
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.