Changing the Linux shell foreground and background colors

Set to white on black backgroundEcho-e "/033[037;40m"Color is selected by adding a dedicated sequence-basically a numeric value sandwiched between "/e[" and "M". If more than one numeric code is specified, separate them with semicolons.Echo-e "/e[31;

Shell--SED usage

Sed is a good file processing tool, itself is a pipe command, mainly in the behavior of the unit processing, you can replace the data rows, delete, add, select and other specific work, the following first understand the use of SEDThe SED command

Shell--shift usage

Shift is a very useful command in UNIX. You can move the command parameter to the left so that the command parameter position in the script is not changed, and all parameters are traversed in turn.As Shift 3 indicates that the original $4 now become

Shell IFS readline.sh

Processline () {line= "[email protected]" echo $line} file= "" if ["] = = =" "]; Then file= "/dev/stdin" Else file= "$" if [!-f $FILE]; then echo "$FILE: does not exists" exit 1 elif [!-R $FILE]; Then Echo '

Shell for, while usage

#数字段形式For i in {1..10}DoEcho $iDone#详细列出 (characters and not many items)For File in 1 2 3 4 5DoEcho $FileDone#对存在的文件进行循环For shname in ' LS *.sh 'DoName= ' echo ' $shname | Awk-f. ' {print '} 'Echo $nameDone#查找循环 (This method can also be used when

Linux Learning Shell script-------references and operators

[This is my own study notes, welcome reprint, but please specify the source:http://blog.csdn.net/jesson20121020] Variables and substitution operations, one of the easiest mistakes to make when performing variable substitution in a script is to

Shell's scripting Exercises

make a demand flow chart requirement Analysis-Program Design-specific implementation of training pointssed,Echo, Test,if, while,Shift1. Demand Analysis: Practice Test-d Scheme design: reflect the idea, first define a variable, with the conditions to

Linux Learning Shell Script

[This is my own study notes, welcome reprint, but please specify the source:http://blog.csdn.net/jesson20121020] Shell Script basic elements:#!/bin/bash ---First line # ---comment variable flow control structureLook at a simple example,

Linux shell switching

If you need to modify the default shell (typically the bash shell), use it handy. Check the shell types available for your system first[email protected] ~]$ chsh-l/bin/sh/bin/bash/sbin/nologin/bin/tcsh/bin/csh/bin/kshModify the current shell[email

Installation and use of the Shell encryption tool SHC

installation and use of the Shell encryption tool SHC1) Tool DescriptionShell scripts are read-write and are likely to leak sensitive information, such as username/password/path/IP. It also leaks sensitive information while the shell script is

Update the local code to the server shell script

Update the local code to the server shell scriptThe first problem with Ubuntu as a development machine OS is to put the updated code on the test server to runWww.ahlinux.comBefore using Windows with WINSCP Update code to the server upThere are no

Auto-Interaction in Pect-shell

This is the automatic landing SSH script I wrote in St, divided into two filesFile 1:sssh#!/bin/bash#xql 2011/01/4#auto SSH 138.198.230.170Case$Inch "Xql")Sssh.exp XQL ;; "Root")Sssh.exp Root ;; "31" ) SSH [ Email protected]10. 80.117. ; "40" )

Fundamentals of shell Programming for Linux

One, variableVariables in the shell are divided into: local variables, environment variables, positional parameters;Local variables: Variables that can only be used in scripts for the user's current shell lifetime, local variables are invalidated as

Shell and bash variable types

The Shell is process-oriented(Bash for example)Variables are process variables, process ends, and variables disappear.Bash Variable type:Environment variablesLocal variables (local variables):Positional variablesSpecial variablesLocal variables: Set

Shell Learning Notes--awk usage

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/4C/wKiom1St7-jhv5MEAAJw30MjWNA274.jpg "style=" float: none; "title=" QQ picture 20150104161512.png "alt=" Wkiom1st7-jhv5meaajw30mjwna274.jpg "/>650) this.width=650; "src=" http://s3.51cto.

Introduction to Linux Shell

A shell is a program that has a special function that can be understood as an interface that users interact with the kernel. We know that the kernel is the heart of Linux, and the kernel is switched on and left in memory when it is turned on. Other

Basics of learning shell scripts (i) (Learning to record posts)

Record command history: The commands we've knocked on, Linux will have a record, saved in the. bash_history file in your home directory. (Note: The current command will be saved in the. bash_history file only if the user exits the current shell

Batch create thumbnails under Linux shell

I. BACKGROUNDToday, suddenly found that the latest news thumbnails on the mobile client are not displayed, on the server looked at,Discover that new news images do not generate thumbnails at all.This set of news release system is very old program,

Shell string and array summary

Blog home: http://blog.csdn.net/minna_d1. Calculate the string length:echo ${#str}2. Truncate the string by character:${word:begin:length}3. With%, percent, #, # #对字符串的切割:%: Right-to-left non-greedy matchPercent: greedy match from right to left#: No

Shell Array Summary

1. Calculate the length of the array:${#array [@]}2. List the array index:${!array[*]} or ${!array[@]}3. Print all the values in the array:${array[*]} or ${array[@]}Iterate through the array elements in 4.shell:For STR in ${array[@]};DoEcho

Total Pages: 541 1 .... 482 483 484 485 486 .... 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.