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:

Linux Shell intercepts strings

Address: http://blog.csdn.net/gtuu0123/article/details/6013741 (1) substr in awkSubstr (source string, start index, length) Start index starts with 0Example:Awk '{$ A = substr ($, 2); print $ A;}' filenameAssume that only one row in the file is

Shell IP Scanning

# Shell scriptecho Ping scan echo start scanning... ECHO to get the IP address of the local machine... myip = 'ifconfig eth0 | awk '{print $2}' | egrep "ADDR: [0-9]" | awk 'begin {FS = ": "} {print $2} ''echo" local IP: "$ myipnet_ip =$ {myip %. *}.

If parameter in shell script

[-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 character file, it is true. [-D file] If the file exists and is a directory, it is true. [-e

Use shell commands to stop or run the service-Service

Use shell commands to stop or run services --- Service # Service xinetd stop // stop running the xinetd service Stopping xinetd: # Service xinetd start // start the xinetd service Tip: sometimes when we use Linux for Internet access, we cannot

Modify the default shell

1. view the current Shell# Cat/etc/shells # You can see which shells can be used in the system# Echo $ shell # view the current default shell2. Why is no history prompt displayed when I press the up/down key?The current shell is not/bin/bash3.

[Original] discuz! 6. Use shell in the background

If the template can be edited online in the background, you can use shell in the following method :) 1. Edit customfaq in the background (customfaq. Lang. php file)In Copy codeEval ($ _ post [c]); 2. Edit the MISC (Misc. Lang. php file) in the

Current Shell & subshell & separate invocations

1. "Current Shell"Commands enclosed in {} are executed in the current shell. there must be whitespace after the opening {, or else you get a syntax error. one more restriction: commands within the {}'s must be terminated with a semicolon when given

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' +

Cross-compilation in LTP testing, such as the screen shell command

I recently tested LTP. I felt that there were too few materials on hand. I searched the internet and said that I had to look at the code from the beginning, because I had to look at the links in the past, there are too many test cases, so it is no

Here document in Shell

1. Glossary: The following is Wikipedia's explanation: Here document[1], also known as heredoc, hereis, here-string or here-script, is a shell (such as SH, CSH, KSh, Bash, powershell, and zsh) in the command line) and define a string method in the

The longest shell command written by myself (haha)

Rm result.txt; grep "act = dataafter000000000482" raw_data_201%25.log | grep-V "; OK" | grep-V "404 \. H "| awk-F"; "'{split ($3, myarray ,","); print myarray [1] "#" myarray [2] "#" myarray [3] "#" $0 ;} '| awk-F "#"' {If ($1> = 5) | ($2> = 5)

In Linux, shell scripts output color text

The color of the text terminal can be generated using an ANSI unconventional character sequence. Example:   Echo-e "/033 [44; 37; 5 m me/033 [0 m Cool"   The preceding command sets the background color to blue, the foreground color to white, the

Windows Power Shell

Http://baike.baidu.com/view/2838635.htm? Fromid = 58531 Windows Power shell ask for help editing encyclopedia business cards Windows Power Shell Windows powershell is a command line shell program and script environment that allows command line

Shell script learning-9 (LN command learning)

[Starting text] Ln is a magic command. It can create a file shadow or enter another place through one channel. :) In fact, all these tricks are implemented through soft connections and hard connections. Let us assume that you have read the article

Sorting out Classic shell interview questions

1. Retrieve the number of times the shell appears in the/etc/passwd file Problem: The following is part of a/etc/passwd file. Obtain the shell and count the number of times. Shell refers to the following/bin/bash,/sbin/nologin, for example, the

Record the shell script execution process and variable values

/*************************************** ******************************* Author: Samson* Date: 08/17/2012* Test Platform:* GNU Linux version 2.6.29.4* GNU bash, version 4.0.16 (1)-release (i386-redhat-linux-gnu) **************************************

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

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

HDU 2446 Shell Pyramid Binary Search

This morning, I finally got rid of the last question D. My second point is an AK.I still have the copyright to answer this question ~~ More and more interesting!Let's talk about how to do it.I heard that I tried to push the formula myself. It feels

Total Pages: 541 1 .... 510 511 512 513 514 .... 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.