recently, I have been engaged in Unix shell and read a lot of books and materials in this process, therefore, we will record some of the details to be noted for the purpose of memo and reminder. The shell here refers to the Bourne shell. I have
There are basically three ways to execute shell scripts:
(1) input is directed to the shell script.
The general form is Bash For example, bash (2) Use the script name as the parameter. The general form is:
Bash Script Name [parameter]
For
I have been using Linux recently and have accumulated some experience and skills. I will share it with you.
1. view the number of objects
WC-l filepath
2 File Sorting
Sort-K1-K2-T ""-n-r filepath
The command above is to sort the file
Method 1: send a simple email
Echo "Hello World" | mail-s "subject" yanggang_2050@163.com
Effect
Method 2: send an email in text format
#! /Bin/sh from_name = "from @ Yanggang" from = "yanggang@fruitsmobile.com" to = "yanggang_20
$ # Number of Script Parameters $ * display all parameters passed to the script in a single string. Unlike the location variable, this option parameter can contain more than 9 $ ID of the current process running the script $! The ID of the last
1Three encryption methods are used: shell, embedding, and internal/external combination.
ShellThe so-called shell is the encryption tool added to the encryptedProgram. The shell is first executed when the encryption program starts. Check the
The shell is a method that automatically protects executable files.ProgramOfSource code. You can use the toolkit to add a protection layer to your application. The shell uses a variety of methods-such as multi-layer protection, anti-debugging,
In Windows shell scripts, if you want to use the current date and timeCompositionFile name. You can use the following method:
First obtain the string of the current date and time;
Separate the desired characters;
Finally, splice the file
# Set the dump file size limit. Ulimit-C unlimitedcd/home/linbc/build/bin # Check whether the dump Folder does not exist. If [! -D ../dumpfile] Then ECHO "Create dumpfile fold" Mkdir ../dumpfilefi # Search
My
_ App1: whether it exists
args.txt
#! /Bin/bash if [-Z $1] | [! -E $1] thenecho "Usage: cmd. sh input "exitfiecho $ 0for num in $ *; do echo" $ num "Done For I in $(SEQ-3 $ #); do echo $ I done for I in {0 .. 5} Do echo $ I done echo $ @ for (I = 4; I $ savepathawk '{A [$0]
Linux Shell is a command binder in Linux. It is easy to combine those tools to make a more powerful tool or automate the work at hand.
Batch is also available in windows, and this function is also available in theory. However, its syntax and
Http://www.hickwu.com /? P = 264
C-l clear screen and clear command
C-a move the cursor to the beginning of the lineC-e move the cursor to the end of the row
Delete one character from C-HC-d deletes one character from the forwardC-B move one
I used to deploy our application into 200 centos machine, and these machines are far from my current office site. The deployment is simple.
Firstly sync the code and build in the head Linux (one of the machine in the Linux farm). Then copy the
Sunflower remote control software is junk!
A few days ago, I tried sunflower remote control software and felt it was drivingProgramInstallation is stupid. Later, the software was completely uninstalled from the control panel.
Next, the system's
Logon to Shell
Before calling the init initialization process, the Linux system mainly performs a series of system-level actions. At this time, users cannot use the system because the system does not allow users to control the system!
The
#! /Bin/sh
# Show script description, different colors
Echo-e"\ E[34; 1 m ###################################### ##########\ E[0 m"
Echo-E"\ E[34; 1 m ### format like 'analysis _ log. Sh 2007-07-01 '###\ E[0 m"
Echo-E"\ E[34; 1 m ###
This article describes how to compile Shell Script. Why shell programming? In LinuxSystem, Although there are a variety of graphical interface tools, token is still a very flexible tool. Shell is not only a collection of commands, but also a
Shell string truncation problem:1. Linux shell intercepts the first eight characters of the character variable by using the following methods:1. expr substr "$ a" 1 82. echo $ a | awk '{print substr (, 1, 8 )}'3. echo $ a | cut-c1-84. echo $5. expr $
MSSQL differential backup is compared with the previous backup to back up different content. In this way, as long as new content is inserted after the previous backup, differential backup can back up the newly inserted content, and this backup file
In the Linux Shell environment, input and output redirection is supported, expressed by symbols . 0, 1, and 2 indicate the standard input, standard output, and standard error information output, which can be used to specify the standard input or
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