InWindowsThe defaultMsysgitOfShellEnvironment (that isGitBash).ShellEnter Chinese characters in the interface and do some processing.
1 Methods of online circulation
Modify configuration file\ Git \ etc \ inputrc, Add or modify the configuration
1. Difference between single quotes and double quotes
Single quotation marks: A single quotation mark can only contain general characters without special characters. Double quotation marks include special characters.
Example:
# Name = vbird
#
Variables can be used in makefile by $ (VAR) or $ {var}. For details, refer:
Http://blog.csdn.net/lovetangtang/archive/2005/12/31/567297.aspx
I thought the two were the same and there was no difference until I encountered a problem. Because of
The format is as follows:
# Echo-e '\ 033 [background color; foreground color; action control M string \ 033 [# m'# Echo-e '\ e [background color; foreground color; action control M string \ e [# m'
# Foreground | Background: Color#----------------
Wget is a command line download tool. Linux users are using it almost every day. The following describes some useful wget tips to help you use wget more efficiently and flexibly.
$ Wget-r-NP-nd http://example.com/packages/
This command
1. First look at a common command
PS-EDF | sort | uniq | grep-V sh | more
This command combines several different shell commands, which have this feature. Uniformity and simplicity.
You can use pipeline commands to combine multiple shell
Enter the following command to understand the shell currently logged on:
$ Echo $ Shell
/Bin/bash
The system uses bash shell. There are many other shells. You only need to enter the new shell command (Ksh, tcsh, CSH, sh, Bash, etc.) in the
Linux Shell is a powerful script program with simple syntax. The following is an executable sh script, covering common shell syntax and usage. Understanding it is equivalent to getting started.
#! /Bin/bash# Title:# Date :?# Author: Made by
Structured commands: Allow scripts to skip or execute these commands cyclically based on the conditions of variable values or the results of other commands
1. Use the if_then statement
If command
Then
Commands
Fi
Run the command after if first.
1.Test File status
Table 1 File status test
-D directory-s file length is greater than 0, not empty-F: regular file-L symbolic connection-R readable-x executable
-S file length is greater than 0, not empty-W writable-The U file has
From: http://www.csdn.net/article/2013-08-15/2816581-What-I-learned-from-other-s-shell-scripts
The author Fizer Khan is a shell script fan who is so obsessed with novel and interesting things about shell scripts. He recently encountered an authy-ssh
Obtain the date of the current day
Date + % Y-% m-% d
Output: 2011-07-28
Assign the current date to the date variableDate = $ (date + % Y % m % d)
Sometimes we need to use the date before or after today, then we can use the-D parameter of
Example 1#! /Bin/shcase ${1 # *. Tar.} In bz2) tar jxvf $1; GZ) tar zxvf $1; *) echo "Wrong file type" esac$1 indicates the first command line parameter ${1 # *. Tar.} when running the script. It indicates that the first command line parameter is
This is the first thing I did in my company that is directly related to programming and requires shell commands. In fact, I feel that the shell under Linux is the same as the DOS batch processing under windows.
Question:
1. Use the shell language
1 Have you ever wondered why SED is called sed?
Sed is short for stream editor. Sed is a stream editor. To put it bluntly, we enter a string of information into SED, which is processed and output. That's simple.
Similar to cut, sed is a row-oriented
A few days ago, when I needed to call the binary program in Java code, I found some information on the Internet and wrote something to record.
Android is also a Linux-based system, and can also run binary executable files. However, Android only
In Java, you can call the Execcommand method to run the shell script. The following is an example:
1 .#! /System/bin/sh
2. # The simplest shell with no function
3. # It must be noted that #! Start with/system/bin/sh (with spaces)
4. # different from
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