what in shell

Alibabacloud.com offers a wide variety of articles about what in shell, easily find your what in shell information here online.

Split string in Shell

Recently the system has learned shell programming.See an example in the book, very dick. I thought about it before, but I didn't get the result.I believe that the students also guessed this example, is a line of string splitting. Students can try it

Common operations of variable quantum strings in shell scripts

String manipulation${#string} The number of characters in the output sentence${string:position:length} output $position The length of the start of the character${string:position}[[email protected] scripts]# liuyifei=] i like sanpan i like luo 

Export comprehension in shell

It has long been assumed that the export-after variables in the shell script will affect the environment variables in the terminal that executes the shell. The concept of environment variables is not unique to the shell, but is owned by the process

Common techniques in Shell programming

1 loops (Command execution ... But the parameter will change)As in the following form:#!/usr/bin/env bash#encoding=utf-8a= "Value1value2value3value4value5value6" for I in $ado echo "cmd $i argv" doneNote: $a cannot be written as a "$a", otherwise it

Talk about export and Source,bash in shell scripts.

Little brother just contact Linux, a lot of things on Linux is more unfamiliar, so write a blog, as their work summary and technology accumulation bar, but also spur their efforts to learn.The reason for today's title is to put Export,source, Bash's

The difference and relation between the inverted quotation mark and the double quotation mark in shell script

Double quotesPurpose: In order to contain text or function segments. In addition to itself, the function inside the counter-quote, the variable starting with $ and \ Start the inverse of the character outside, the rest are directly output.The

Process Control statements in shell programming

1. Conditional selection: If statement① Single Branchif judgment condition; then condition is true Branch code FI② Dual Branchif judgment condition; Then condition for true Branch code else condition for false Branch code FI③ Multi-Branchif judgment

Error dirname in shell script: Invalid option--B

Today, when I write a shell script, I find that debugging will make a mistake.[Email protected] autoawrrpt]$. a.sh dirname: Invalid option--B Please try to perform "dirname--help" for more information. BaseName: Invalid option--B Please try

Eval in Shell

Syntax: eval cmdlineEval will scan the back of the CmdLine two times , if after the first scan, cmdline is a normal command, then execute this command;If the cmdline contains an indirect reference to a variable, the semantics of the indirect

The method of generating random numbers in Shell series

One: RANDOMEcho $RANDOMRandom number is a range of 1--32767, generally used it can be cracked1.2 Generate a eight-digit random password:echo $ (($RANDOM +11111111))Two: Md5sum random encryption method generates a longer passwordTake 9-digit password:

Whitespace in shell script command-line arguments

Look at a little script#!/bin/bash#demonstarting the shift commandcount=1while"$" Do "Parameter # $count =$1" Count 1] ShiftdoneechoechoThe script first tests whether the first parameter exists as- n "$" , prints if it

Old boy Education daily-day 98th-shell Knowledge Point: A common use of string interception in shell scripts?

Answer reference:Suppose there are variablesvar=http://www.oldboyedu.com/123.htm.1. # Intercept, delete the left character, leave the right character.Variable: Var=http://www.oldboyedu.com/123.htmecho ${var#*//} where Var is the variable name and

Special usage of $0,$?,$! in shell

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

Ping a network segment of signal capture and function practice scripts in shell scripts under Linux

The main purpose of the script is to practice capturing signals in a Linux bash script, by practicing the use of functions, and by terminating a running program, subsequent processing of files opened by the program, and so on!Scripting Features:Ping

Ping a network segment of signal capture and function practice scripts in shell scripts under Linux

The main purpose of the script is to practice capturing signals in a Linux bash script, by practicing the use of functions, and by terminating a running program, subsequent processing of files opened by the program, and so on!Scripting Features:Ping

Some of the special symbols and functions that are common in shell scripts

In writing shell scripts, we need to use a variety of special symbols, through these special symbols can make the code we write more concise and efficient, here are summarized below:1. {} curly braces:Usage One: Wildcard extensionEg:ls

[]/[[]] differences in shell scripts

Transferred from: http://www.cnblogs.com/include/archive/2011/12/09/2307905.htmlReference:http://www.51testing.com/?uid-7701-action-viewspace-itemid-13731http://blog.csdn.net/sunboy_2050/article/details/6836382Shell BracketsWhen learning the shell

Demand analysis of array warning system in Shell function shell

I. Functions in the shell[Email protected] aming]# cd/root/shell/aming[Email protected] aming]# vim fun1.sh//need to be aware that function names cannot conflict with some keywords in the shell#!/bin/bashfunction InP () {Echo $ $ $ $#}INP 1 a

Summary of usage of SEQ in shell

usage: seq [options] ... Mantissa or: seq [options] ... First number mantissa or: seq [options] ... The first number increment mantissa Prints the number to the mantissa starting with the specified increment from the first number.  

Automatic password entry in shell scripts

Recently learned SCP automatically entered the password.#!/bin/bashSet-xTime= ' Date +%y%m%d%h%m%s 'Source= '/home/cqq/project 'Passwd= ' 123 'Tar zcvf ${time}.tar.gz $SOURCE >>/dev/null 2>&1Expect-c "Spawn scp-r [Email

Total Pages: 15 1 .... 9 10 11 12 13 .... 15 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.