Shell display with color font

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:

Tips for replacing strings in a shell

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 :~ /

Time period parameter passed by Shell

#! /Bin/shD1 = 20111201.D2. = 20120625Time = $ (date + % s-d ''$ D2'')-$ (date + % s-d ''$ D1 ''))); # date differenceT = 'expr $ time/100' # Number of different daysFor (I = 0; I Do# Echo $ d1Perl XX. pl $ d1D1 = 'date-d' $ D1 'utc 86400 seconds' +

Linux Shell Learning

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

Source problems in shell scripts

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

Common shell programming and instances-continuous updating

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}

In Linux, regular cutting of nginx access logs and packaging of compressed shell scripts

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"

Study on Shell exported from access: kevin1986

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:

Targeted output of shell commands 2> & 1

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

Location parameters in Shell $ #, $ *, $ @, $0, $1, $2... And special parameters $ ?, Meaning of $-and so on

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

Unix shell learning notes

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

Ubuntu/Linux tips (shell shortcut)

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:

Three sort algorithms (bubble/quick/Shell) bubble, fast sort, Hill ......

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

Shell script Control Service Startup

/* =================================== Startacct. sh ===================================== */ #!/usr/bin/ksh./vbsvr_boot_boss.sh -s ./boss_server.lst > vbsvr_boot_boss.log & /* ================================= Vbsvr_boot_boss.sh ==================

Common shell command instance analysis-continuous update

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

Linux Shell: My first shell program

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

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

Shell Chapter 3 quotation marks and operators

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

Shell calls the Stored Procedure

#! /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:

Shell script used to determine whether the IP address is correct

Shell script used to determine whether the IP address is correct[Copy link]     #! /Bin/bash Checkip (){ If echo $1 | egrep-Q '^ [0-9] {1, 3

Total Pages: 541 1 .... 413 414 415 416 417 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.