Understand a dialect in the Linux Shell: 2>&1

Understand a dialect in the Linux Shell: 2>&12016-11-14 Du Yishu ObjectiveWhen using Linux commands or shell programming, this usage often encounters 2>&1 If it is just beginning to touch Linux, this thing really does not understand, because he has

Numerical calculation of shell-variables

The numerical computation of a variable is like a command.(()), let, expr, BC, $[]Here's a look at the operator of numeric calculations650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/8C/92/wKioL1hwVHaicj-lAAEicHK4YyY296.png-wh_500x0-wm_3 -

The most common shortcuts for Linux shell commands

Bash provides a number of shortcut keys, the following are the most commonly usedCTRL + A cursor moves to the beginningCtrl+e cursor moves to end of lineCtrl+l Clear ScreenCTRL + C terminating processCTRL + Z Hang up processCtrl+u Delete the

9th Shell Foundation (2) _bash basic functions

3. Bash 's basic features3.1 Historical Command and command completion (1) History command :#history [Options] [history command Save file]① option:-C: Clears the history command;-W: Writes the history command in the cache to the file ~/.bash_history(

Application Technology of shell variable quantum string

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/8C/17/wKioL1hiDtOToZ39AAPTKCCfJ7g699.png "title=" 1.png " alt= "Wkiol1hidtotoz39aaptkccfj7g699.png"/>[Email protected] zhouyu]# a= "I am Zhouyu"[Email protected] zhouyu]# echo ${#a}11[Email

Shell Programming (v) Bash features

Bash featuresTerminal, the interface program attached to the terminal:Gui:kde, GNome, XFCECli:/etc/shellsBashZshFishFeatures of bash:Command line expansion: ~, {}Command aliases: Alias, UnaliasCommand history: HistoricalFile name wildcard:

Shell script loop using for while explanation

Loops in any programming language are more than enough, and of course the shell script also has a looping statement, including a for statement, while statement. This article mainly uses the actual use case to illustrate what common use methods and

Shell Special variable Meaning

Variable Description:$$The PID of the shell itself (ProcessID)$!PID of the Shell's last running background process$?End code of the last Run command (return value)$-Flag at a glance using the SET command$*All parameter lists. such as "$*" in the

How to solve the shell script in Jenkins obviously failed to execute, but not self-exit, and the construction results still show success problem??

First, you need to make sure that the results of the shell command execution are $0 or not 0 can only represent the execution of this statement, for example: Execute statement: ADB connect 192.168.XX. XX execution Result: Unable to connect to 192.168

Chapter One Shell Basics

1.1 IntroductionThe shell is a C language scripting language, it is the user and Linux bridge, the user input command to the shell processing, the shell will be the corresponding operation to the kernel (Kernel), the kernel to the results of

How to write a shell script to not bullying?

1. A SHELL script that does not log logs is bullying!We often encounter a problem in our work, what exactly does a Shell script do, when it starts executing, and when it ends. Especially database backup, we would like to know our MySQL database

Initial shell, set NIC parameters

See the shell, write a script to set the parameters of the network card try it. It's inefficient, but it's a good use.===================#!/bin/bashLang=zh_cn. UTF-8Clear #Select the network cardecho "' Date '"Echo-e "\033[34m Select Network Card

Compare digital subtraction based on shell scripts no BC

The following methods can not install the BC calculatorCreate sh fileCheck------------------------------------------------------------------v#!/bin/Bashread-P"Please enter the first number"Aread-P"Please enter a second number"Becho"and the"' Expr $a

shell-writing a distribution system

Distribution system: Used for multiple server code or software simultaneous distribution of execution1.install–y Expect installation expect program for automatic login to remote server2. Write Automatic Login ScriptVim Hu.expect#! /usr/bin/expectSet

"Linux use" Bash Shell command line common shortcut keys (reprint)

Ctrl + A: Moves to the beginning of the currently edited command,Ctrl + E: Moves to the end of the currently edited command line,Ctrl + F or->: move by word aligns (toward the end of the command line, forward)Ctrl + B or Alt + F: Move right by word (

Shell Learning Notes

1. Shell Script Parameters The $n represents the nth parameter passed to the script, for example, $ $ = 1th argument, and $ = 2nd parameter .... $# number of command-line arguments The name of the current script $* returns the

Linux Shell if parameter

Used in shell programming to determine parameters within an if statement–b return True when file exists and is a block file-C Returns True when file exists and is a character-D returns True when pathname exists and is a directory-E Returns True when

Change the return value into an array variable under the shell

Under BASH2, you can use the ($ ()) combination to obtainVar= ($ (cat/etc/passwd |awk-f ': ' {print $} ' |head-3))Returns the full value of the array:Echo ${var[@]}OrEcho ${var[*]}To take an array of members:echo ${#var [@]}Orecho ${#var [*]}Take a

Examples of shell multithreaded programming

#!/bin/bash#a_sub () {    sleep 5}multi_thread () {    thread=5              #  define the number of threads here      tmp_fifo= "/tmp/$.fifo"     /usr/bin/mkfifo  $TMP _fifo    #  Create a new FIFO type of file     exec 6<> $TMP _fifo    /bin/rm -f 

3 Windows environment interacts with Shell

/** * by Sshconfig Configuration get a session * @param conf * @return*/ Public StaticSession createsession (sshconfig conf) {Log.info ("try Connect to"+ conf.gethostip () +", Username:"+ conf.getusername () +", Password:"+ Conf.getpassword () +"

Total Pages: 541 1 .... 221 222 223 224 225 .... 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.