2. Compile and test:
A. Open a command line window and switch the directory (CD) to the location where SLUtil.exe is located.
B. Open the Library shell folder next to the Command Line window and you will see the changes you have made using the
Shell variables are divided into environment variables and custom variables, the difference is whether the variable can be used in the quilt process, look at the following diagram:
If you are an environment variable, you can continue to use it in
For Java Applications (non-Web applications), after deployment, a startup script is often required to load some Third-party jar packs and start the application.
For Java applications, I generally prefer to write the directory structure of a program
&&Command 1 && Command 2: If this command executes successfully && then execute this command.[Development]/usr/xxxx/ytcclb>ls-l Test.sql-rwxr--r--1 xxxx Group Nov 14:12 Test.sql[Development]/USR/XXXX/YTCCLB>CP Test.sql Test.bak && echo "Coping file
"Cloud security" we are no longer unfamiliar, with 360 security guards 6.0, Jinshan Shell 1.0, we have officially entered the "cloud security" era. Then these manufacturers blown marvellous "cloud killing", whether really can replace the
Improve web site speed experience in addition to its own web site program optimization, for LINUXSA, there are a lot of work to do, optimize the system kernel, adjust the parameters of the Web server, optimize the database, increase the Web site
Not long ago I saw two interesting commands in the book--script and Srciptreplay, which can record a terminal session in a file, that is, we can create a command-line video tutorial through a terminal session, or we can share session files with
Linux text processing tools are very rich and powerful, such as a file:
Copy Code code as follows:
Cat Log
Www.jb51.net 192.168.1.1
Www.jb51.net 192.168.1.1
Www.jb51.net 192.168.1.2
Ffffffffffffffffff
Ffffffffffffffffff
Copy Code code as follows:
#!/bin/bash
#author: 505056357@qq.com
echo "Backup Job Start"
#设置要备份的网站目录, that is, the root directory of the Web site
File=/home/wwwroot/default
#设置本地备份目录, for storing the packaged files
Add: This is valid for the first time to add a network card, if you need to repeat the addition and deletion of automatic configuration, you need to change the script, according to the IP a command information to modify.
Copy Code code as
Command substitution means that the Shell executes a command and replaces the command substitution with the result of executing the command.
There are two ways to replace a command:
1. Use backtick symbols (i.e. ..., inverted quotes, accented
First, simple version
Refer to the example of StackOverflow and change one out:
Copy Code code as follows:
While ifs= ' = ' Read var val
Todo
if [[$var = = \[*]]]
Then
section=$ (echo $var | sed ' s/^\[\ (. *\) \]$/\1/')
Example one: Drawing special graphics
Copy Code code as follows:
#!/bin/bash
Max_no=0
Echo-n "Enter number between (5 to 9):"
Read Max_no
if! [$MAX _no-ge 5-a $MAX _no-le 9]; Then
echo "WTF ... I ask to enter number
Wrote a shell script, can be used to count the daily access log, and sent to the e-mail to facilitate daily understanding of the site.The script counts:1, the total number of visits2. Total Bandwidth3. Independent Visitor Volume4, access to IP
Some arguments are used in the Bash Shell,
$1,$2,... A specific number of parameters, the name of the currently executing process name, the script itself, or the whole row output in a regular expression
$# the command line or the number of
Collect a simple shell learning document:Link:http://c.biancheng.net/cpp/view/6994.htmlThe shell itself is a program written in C, which is a bridge for users to use Unix/linux, and most of their work is done through the shell. The shell is both a
command-line editing operationsFunctionCtrl+b or LEFT ARROW keyMove one character to the left (move to the previous character)Ctrl+f or RIGHT ARROW keyMove one character to the right (move to the next character)CTRL + AMove to the beginning of the
1. Iterate over each line in the file while read line; Do Echo $line; Done file. txtOrCat file. txt | ( while read line; Do echo $line; done)OrCat file awk ' {print} '2. Iterate over a word for inch $line; Do Echo $word; Done3. WC statistics
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