Format: Echo "/033 [text background color; font color M string/033 [control code"If the font color is displayed, the font color can be fixed to 0 MB.Format: Echo "/033 [text background color; font color M string/033 [0 m"
Color Range: 40-49
40:
Replace, which is included with MySQL.
Usage (matching is based on the comparison length ):Replace from to [from to]... -- file 1 file 2-- The following file list may also be changed to standard input.
For example: Stlxv @ stlxvcomputer :~ /
Regular Expression
$
Matches the end position of the input string. If the multiline attribute of the Regexp object is set, $ also matches '/N' or'/R '. To match the $ character, use/$.
()
Mark the start and end
I encountered a problem today,
The shell script (test. Sh) is as follows:
#! /Bin/shecho "Export monitor = 1">/etc/profilesource/etc/profile
After the call (./test. Sh), execute echo $ monitor without outputting any value, but the profile has
This article by larrylgq prepared, reproduced please note the Source: http://blog.csdn.net/larrylgq/article/details/7395261
Author: Lu guiqiang
Email: larry.lv.word@gmail.com
Variable:AAA = "LV"; do not use SpacesEcho $ AAA-> LVEcho $ {AAA}
I wrote this article before.ArticleHowever, this log is missing due to the previous data loss fault. So I re-wrote this script and posted it again to everyone.
#! /Bin/bashlogs_path =/home/logs/www/arch_log_path =$ {logs_path} $ (date-d "yesterday"
When I went to bed in chemistry today (Khan ......) dreaming, dreaming of penetrating a magic = off PHP injection point, and then happy mouth water flow (..... sleep too much), suddenly woke up, and immediately wrote the dream idea on the paper:
Mycommand> mylog.txt 2> & 1 should be the most classic usage.
Command results can be output in the form of "%>", % indicates the file descriptor: 1 indicates the standard output stdout, and 2 indicates the standard error stderr. The default value of
Some special symbols are often seen in bash shell. I collect them for reference:
Location parameters:For more information, see ABS (Advanced bash shell). The English version of ABS is the same.
$0, $1, $2, and so on...Location parameter, which is
Recently I reviewed some Unix shell programming. In fact, UNIX is a very good operating system, and it may not be as easy as Windows XP in terms of ease of use and user experience. However, many underlying ideas and script technologies are
Collect common skills and notes.Occasionally updated.
1. Shortcut Keys
Terminal shortcut:
CTRL + C: Stop Ctrl + Z: switch to the background Ctrl + D: cancel the current session Ctrl + W: Delete the command parameter Ctrl + u before the cursor:
Preparing for Job Review in the last two days. This section summarizes the three sorting algorithms mentioned in the internal sorting chapter of the data structure. Simple implementation.
// Sort. CPP: defines the entry point for the console
Common Programming and example of Shell on: http://blog.csdn.net/larrylgq/article/details/7333632
1: ls * | while read FN; do grep-V ', 11,1108, 1133,110816, 110816' $ FN>/data1/hadoop/back_up/tmp/$ {fn} _ 08171819; done
Ls * output
| Media
Here, I will first introduce what a shell is, then introduce my first shell program and the lessons learned from it.
I. What is shell?Before talking about my shell program, I 'd like to tell you what shell is. I believe you have heard a lot about
Hadoop shell command remote submission
I. Principle of hadoop shell command remote submissionHadoop shell command execution is usually performed through Linux Shell in many scenarios. It is also very painful for developers who are used to remote
2.2 quotation marks
1, double quotation marksDouble quotation marks can reference any character except '(reverse quotation marks), $, \2, single quotesSingle quotation marks ignore any referenced values. In other words, if special meanings are
#! /Bin/sh##--------------------------------------------------------### -- Function Description: Call Sp (only SP has 0-4 in parameters and 2 out parameters)# What needs to be improved: parameter type determination# -- Input parameters:# -- $1:
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.