After I recently changed Ubuntu, I felt dizzy and eye bloat easily. Because I installed eye protection software on Windows, the screen lock will automatically prompt users to rest their eyes at regular intervals. Google hasn't found an
#1 Add the execution permission chmod U + x a to the script. sh, and then you can directly use the full path to execute the script, for example, in the current folder. /. sh. If the directory where the script is located is in the path environment
Getop string1 string2 .. the characters marked in nstring1 indicate valid signs (-can be followed by characters). If there are: After the flag, it indicates that this sign is followed (there can be 0-N spaces) stringx is its parameter. getop
The case expression can be used to match a given string, not a number (do not confuse switch... case in C ).
Case... in...) do something here esac
The file command can identify the file type of a given file, for example, file lf.gz. The output
FTP-I-v-n
FTP download, open IP port is the connection server, User Username Password is the login, CD/admin is the CD to the Admin directory under the FTP server, LCD D: /Shell/data is used to change the local working directory to the
I learned the shell script today and copied a simple script on the Internet as follows:
#! /Bin/bashCygwin = true# Assign values to variables:A = "Hello World" # No space exists on both sides of the equal sign# Print the value of variable:If $
Using the MV command is not feasible for read-only files. If you want to transfer files between your PC and your android target, the easiest way is to use pull or push, if you are copying files in different folders on your android target machine,
Sed
Reads a row of data, matches the edited command, modifies the data, and then outputs itOutput
Basic Format
Sed options script file
-EExecute multiple commands
-FSpecifies the command file, where the command does not need to";"Split
If parameters in Shell in Linux[-A file] true if the file exists.[-B file] If the file exists and is a special block file, it is true.[-C file] If the file exists and is a special word file, it is true.[-D file] If the file exists and is a directory,
Overview
Input/Output redirection is supported in the Linux Shell environment, expressed by the symbols " ".
0 indicates standard input.
1 indicates standard output
2 indicates standard error message output
0, 1, and 2 can be used to
For Dev and UAT environments, databases must be in archive mode, but do not need to be backed up. Therefore, the constant increase in archive archiving logs results in a large amount of disk space consumption. In this case, you can use a shell
#/Bin/bash
1, Wildcard
*: Match any character or string, including an empty string.
? : Match any character. For example :?ABCCan match anyABCIt is a string of four characters that can be switched to or from any character.
[…]: Match any single
Some common shell commands in Linux
For many programmers who often program in XP, it is not a habit to suddenly switch to programming in Linux, because a lot of things that can be done with the mouse in XP before, now we use commands to complete the
If [-z "$1"]; thenEcho "You did not enter the parameters for executing the shell"Exit;Fi
If ["$1 "! = "JF"] & ["$1 "! = "Token"]; thenEcho "enter the name of the server to be uploaded: JF score, audit by region"Exit;FiCur_year = 'date + "% Y
Http://www.xxlinux.com/linux/article/development/shell/2006-09-22/4499.htmlHttp://www.diybl.com/course/6_system/linux/Linuxjs/20071027/80454.htmlHttp://linux.chinaunix.net/techdoc/system/2008/09/04/1030374.shtmlBoth exec and source are Bash Internal
2.4 pipelines and redirection2.4.1 redirectionFile descriptor redirection description0 1> standard input2> standard error output> Append2> & 1 standard output and error output to the same fileSpecifically, you can use/dev/null to effectively discard
1 Overview
Xargs is a common command for UNIX and Unix-like operating systems. It is used to convert the parameter list into small segments and pass it to other commands to avoid the problem that the parameter list is too long.2 features
(1) process
ShellColor in
1)
Concept
ANSIEscape code to control the display format
ToCSI(Control sequence indicator).
Select graphicRendition, Select image reproduction
2)
Csin [; k] m
N/KDefine the selected display control,MTableSGREscape
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