Shell script output with color font __ Zecundi

Output Effect Format control:\033[0m Turn off all properties\033[1m Set High brightness\03[4m Underline\033[5m Flashing\033[7M Reverse Display\033[8m Hidden\033[30m--\033[37m set foreground color\033[40m--\033[47m Set background color Format

Spark-shell-Initiated problem solving _hadoop

Spark-shell-Initiated problem solving Today in the start of the Spark-shell model of the wonderful appearance of the following several problems 1 Port occupancy: 4040 Port is occupied, we know that 4040 is the worker's port use, but is occupied, as

Shell Script Pass Parameter

What does it mean in the shell that we will see the symbols of $ , $, and $? Simply put is the name of the shell script that you wrote, the first parameter you wrote to your shell script, and the second parameter that you wrote for your shell script.

The shell extracts the file suffix name and determines whether it is a specific string

If the file is a. css file or a. js file, it is processed.file=$1if ["${file##*.}" x = "css" x]| | ["${file##*.}" x = "JS" x];then do somethingfiAttention:1> extract file suffix name: ${file##*.}# #是贪婪操作符, match from left to right, match to the

Shell Script 3

# Experimental Case One,**Writing sysmon.sh Scripts(1) Use the DF command to extract the disk occupancy of the root partition and assign a value to the variable dug.(2) Use the Mpstat command to extract the CPU usage (Install the SYSSTAT package)

The internal variables of shell scripting learning

One$BASH    The path of the Bash 's binary program file  Two$BASH_ENVThis environment variable will point to a bash startup file that will be read when a script is called.Three$BASH_SUBSHELLThis variable is used to indicate the level of the child

Shell 3 Array

Shell Arrayshell支持一维数组(不支持多维数组),并且没有限定数组的大小。Defining arraysshell中,用括号来表示数组,数组元素用空格分隔,下标从0开始Mode 1 数组名=(值1 值2...值n),如array_name=(value0 value1 value2)Mode 2 array_name=(value0 value1 value2 )Method 3 defines the value of the array

007 shell Attempt

After obtaining the source code of 007 shell, I couldn't compile the source code. After reading the source code, I corrected a small bug and compiled OK.Run "./007 shell-s" on one Linux and "./007 shell-c-h ip_of_linux" on the other linux2 ",A

Usage and differences of Shell and ShellExecute functions in VB

Write a VBProgramTo integrate the original programs of VB and VC. Is to use shell functions. The results show that the VC program can be properly displayed, but the VB program is minimized when it is written. I checked the following

Linux Shell if command parameter description

-B. returns true if the file exists and is a block file. -C: returns true if the file exists and is a character file. -D. If pathname exists and is a directory, true is returned. -E: returns true if the file or directory specified by

Shell programming Summary

Shelll basic programming theory and some examples   Abstract: This article describes how to compile a shell script based on a large number of instances. (13:27:24) Why shell programming? In Linux, although there are various graphical interface

Cron commands in Linux & Unix shell programming guide

  1. run commands in the background Cron: System scheduling process. It can be used to run jobs during off-peak hours every day, or during different periods of one week or one month.At: Command. It is used to run some special jobs at a specific time,

Shell Text Segmentation

Problem: It is necessary to pre-process a file of several GB and tens of millions of lines. Function: splits records in a file into different files according to certain rules. Advantage: It is really convenient to use shell scripts for text

Shell operations and simple programming (6)

Linux Shell Programming In fact, the interactive interpretation and execution of user input commands as a command language is only one aspect of the shell function, shell can also be used for program design, it provides a variety of methods to

Use of Linux Shell Variables

I. Use of local variables Local variables act only in this shell, just like local variables. It does not affect variables in other shells. 1. Show variable valuesYou can use the echo command. Note that you must add the $ symbol before the variable

Linux Shell script programming-cut command

Cut The cut command can extract text columns from a text file or text stream. Cut syntax [Root @ WWW ~] # Cut-D 'delimiter '-F fields   The PATH variable is as follows: [root@www ~]# echo $PATH/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R6/

Linux Shell script programming -- function return value

Shell function return value, two common methods:Return,Echo 1) Return StatementThe Return Value of the shell function, which can be the same as that of other languages, returned through the return statement.Example: #!/bin/sh function test() {

Common shell file processing commands

Merge and split files:1. SortCommand Format:Sort-CMU-O output_file [other options] + pos1 + pos2 input_file-C: whether the test file has been classified.-M combines two classification files.-U: delete all duplicate rows.-O stores the output file

BASH Shell for concurrent multi-process operations

Preface The basic languages I have mastered: PhP (most familiar with, the code in the project is implemented using it), bash shell (O & M tool), and C (ACM dedicated ), it seems that only C can implement multithreading, but C is only used to learn

Introduction to shell and common ideas for shelling [favorites]

I. Introduction For the purpose of compressing program resources and registering and protecting program resources, the shell can be divided into two types: Compressed shell and encrypted shell.UPX aspcak telock pelite nspack...Armadillo asprotect

Total Pages: 541 1 .... 393 394 395 396 397 .... 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.