Shell Programming--eof

In shell programming, "EOF" is often used in conjunction with ""It can be interpreted as a delimiter (delimiter). Since it is a delimiter, the form is naturally not fixed, where "EOF" can be customized, but the front and back "EOF" must appear in

Shell programming--conditional judgment

1. Judging by file type (common)-B To determine if the file exists-D to determine if it exists and whether it is a directory (the directory is true)-E to determine if the file exists (exists as true)-F to determine if the file exists and whether it

Querying the Shell's command--type

Type command[[Email protected] ~]# Type [-TPA] name options and parameters:: Step with any option no parameter, type will show if name is an external command or bash built-in command -T: Whenthe-t parameter is added, the type The name is displayed

Shell and regular Expression part1

1. What is a shell?The shell represents two levels of meaning, one is the command interpreter, such as BASH, and the other is a shell script (a program written using the shell's function, which uses plain text files to write some shell syntax and

Shell Programming 2

Shell Programming 2First, conditional judgment statement1, according to the file type to judge  Eg:test-e/etc/passwd or [-e/etc/passwd] &&echo yes | | echo no note [] There must be spaces on both sides2, according to the file permissions to

Shell Regular Expression

One. grepgrep parameters:- n: Show Line Numbers- o: Show only matching content- Q: silent mode, no output, you have to use $? To determine the success of the execution, that is, there is no filtering to the desired content- L: If the match succeeds,

The operating environment of the Bash shell

Path and command search orderBash Pit WelcomeBash Environment configuration fileTerminal settingswildcard characters and special symbolsThe TTY1~TTY6 command interface reads some key settings for the local computerUse Stty to view key contents[Email

Where to look in the shell

[Email protected]_48_191_centos 456]# vim 2.sh#!/bin/bash #加入这行, which means that the interpreter is bash, no plus, I'm CentOS, the default is bashEchoecho $[Email protected]_48_191_centos 456]#/2.sh 1./2.sh1[Email Protected]_48_191_centos

Shell Foundation Part3

Shell BasicsIntroduction to environment variable configuration file1, the role of the source command is to force the environment variable configuration file, the format is: the source environment variable configuration file or. environment variable

Shell input and output redirection

Standard input: 0 Standard output: 1 >,>> or 1>,1>>Error Output: 2 2>>,2>/dev/null 这个设备,是linux 中黑洞设备,什么信息只要输出给这个设备,都会给吃掉 Send standard output, error output to/dev/null$ ls test.sh test1.sh >/dev/null 2>&1,1 represents the standard output 2

Basic Process Control for shell scripts

If ElseRead-p ' Please enter the score: ' Scoreif [$score-lt 60]; Thenecho ' 60 points below ' Elif [$score-lt 70]; Thenecho ' 60-70 minutes between ' elif [$score-lt 80]; Thenecho ' 70-80 minutes between ' elif [$score-lt];thenecho ' 80-90 minutes '

Useful shell Commands

Netstat netstat-print network connections, routing tables, interface statistics, masquerade connections, and Mul Ticast Memberships See Parameters: -A (All) displays all options and does not show listen related by default-

Linux Shell && | |

The && (Command execution Control) syntax is formatted as follows: Command1 && command2 [&& Command3 ...] 1 use && connection between commands to implement logic and functions. 2 only the command on the left of && returns True (command return value $

Shell's awk

Brief introductionAwk is a powerful text analysis tool, with the search for grep and the editing of SED, which is especially powerful when it comes to analyzing data and generating reports. To put it simply, awk reads the file line-by-row, using

The Select loop in the shell uses

Select Use AloneCat select01.sh #!/bin/bashecho "which car do you prefer?" Select CAR in Benz Audi volkswagendo Breakdoneecho "you chose $CAR"Run resultsSH select01.sh which car do you prefer?1) Benz2) Audi3? 1You chose BenzSelect and case are used

Shell condition judgment

Conditional judging TypeAs long as the procedure, then the conditional judgment, that is, if then this discriminant must be learned, the other is Case...esacIf....thenThis is If...then is the most common conditional judgment, it is divided into

The shell writes a simple Hanoi

########################################################################## File Name:hanoi.sh# Author:free# Mail: [email protected]# Created time:2017 April 18 Tuesday 14:36 43 seconds##################################################################

Usage of shell arrays

Variable: Stores the memory space of a single element:Array (multiple contiguous memory spaces): a contiguous memory space that stores multiple elements:Array Name:Index: Numbering starting from 0, is a numeric index;Note: Indexes can also support

Shell script Basics--arrays

Q1. ArraysWe know that variables are memory space, each variable can only store a single data, a one-time assignment operation, then encountered some need to continuously store and read the task, if you still rely on the variable for multiple

Windows64 bit install GPU version TensorFlow 0.12,power Shell enter: Full tutorial on installing TensorFlow

It is recommended to use PowerShell, just enter PowerShell in the CMD command window Download 64-bit Python3.5 (be sure to 3.5!! Python3.5.2 can be downloaded and installed via Python 3.5 from python.org or Python 3.5 from Anaconda (note selecting

Total Pages: 541 1 .... 522 523 524 525 526 .... 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.