[Chapter I.] Shell Basics

What is a Shell?Outline "Preface " 1. Shell Introduction 2, Bash function introduction 2.1. Record command history 2.2. Command and file name completion 2.3. Aliases2.4. pipe character/redirect 2.5. Shortcut keys 3. Bash

The IF statement for the shell script

First, prefaceIn structured programming, there are three main structures: sequential, branching, and cyclic. This shows the importance of branch judgment.And in shell programming often encountered in the case of judgment, such as: Determine whether

"My technology is my Master" shell script: Create a function and specify the directory to download

Using Nginx as a load balancer, proxy Web server, the user requested data points to the Nginx load balancer, Nginx is responsible for scheduling the backend Web server to provide services.Environment Construction and Description:Nginx Load Balancer

Shell Learning Notes (Org-mode production)

S Shell Learning Note v1.0table of Contents 1. What's shell 2. Hello World Program 2.1. SRC 2.2. Add run Privilege 2.3. Run shell 3. variables in Shell 3.1. System

The assignment statement and Judgment statement in parentheses judgment in shell programming

#!/bin/bashdeclare var="XXX" #without space and use one =#1.judge Whether the assignment statement returns trueEcho"----------------------test Assignment in bracket--------------------------------"[var="yyyy"] && Echo"Success"Echo"End" #Success["$

Shell shortcut keys

eol

Ctrl+A-JumpTo the start of the lineCtrl+B-MoveBack aCharCtrl+C-TerminateThe commandIs it the most used?Ctrl+D-DeleteFromUnder the cursorCtrl+E-Jumpto theEndof the lineCtrl+F-MoveForward aCharCtrl+K-DeleteTo EOLCtrl+L-ClearThe screenClear screen,

Ubuntu_ using the shell

The shell is a command interpreter that provides interaction between the user and the operating system for a non-interactive interface that is oriented to the command line. The user enters commands at the command line, the shell interprets them, and

Shell Debugging Technology

Trap commandBasic format: Trap command SIG1 SIG2 ... signThere are 3 types of signals that can be captured:Exit: Exits from the function, or the entire script finishesERR: When a command returns a non-0 status code, the command execution is

Shell Bulk Replace content in text

Bulk Replace directory/proc in script file, for/ETC/INIT.D[Email protected] course_04]# more test.sh #!/bin/bashdir=/procaa= ' ls $DIR ' echo $aa650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/AD/wKiom1WktFCyF39TAAD5F48gmko076.jpg

Linux Shell Command Series (3)

bz2

One. Chown commandThe "chown" command changes the owner of the file and the user group. Each file belongs to one user group and one user. In your directory, use "Ls-l" and you will see something like this.[Email protected]:~# ls-lDrwxr-xr-x 3 server

Special variables in the shell

$ represents the current process when using the Echo $$ is the PID that will output the current shell1 Echo $$ List of special variables variables meaning $ File name of the current script

SSH Secure Shell displays server tomcat background content

As Linux small white, only learn a little bit to remember:When deploying a server, it is often necessary to view the console output as if it were local, to be able to view log output overrides on Linux, and, of course, to have the logs displayed in

Shell learns 33 days----about redirection

About redirectsAdditional redirection operatorsUse set-c collocation Posix shell : execute set -c command to open shell The so-called forbidden override option simple > redirect encountered when the destination file already exists

Shell Scripting Basics (bottom)

Case judgment in the shellFormat: Case variable name invalue1)Command;;value2)Command;;*)Commond;;EsacIn a case program, you can use a |, meaning, or means in a condition, such as:2|3)Command;;When the variable is 2 or 3 o'clock, the part of the

Synchronizing files remotely by using SCP or rsync in a shell script

The simple use of the remote SCP file shell expect is implemented in shell scripts with expect http://myunix.blog.51cto.com/191254/1095074http:// Jie-hui-520.blog.163.com/blog/static/60074301201022610217249/linux rsync Synchronous Practice Http://my.

Linux Shell && | |

Forwarding: Linux Shell's && | | When the shell executes a command, it returns a return value that is saved in the shell variable $? In When $? = = 0 o'clock, indicating successful execution;   = = 1 o'clock, which indicates that the execution

Shell Common Commands

1. pwdPWD: Displays the absolute path of the current directory2. cdCD Document: Go to subdirectory cd/usr/local/lib: Go to the specific directory CD.: Return to Parent directory CD/: Return root directory3. mkdirmkdir directory: Creating

The classic shell surface question arrangement

First, remove the number of occurrences of the shell in the/etc/passwd file: Here is a partial content of a/etc/passwd file. The topic asks to take out the shell and counts the number, the shell refers to the back/bin/bash,/sbin/nologin and so on,

Array of shell scripts

Array:A collection of a bunch of variables.Statement:Declare-a ArraynnameEach of these variables is Arrayname[index]Index starts from 0.Assignment value:Arrayname[index] = VALUEArrayname = (VALUE1 VALUE2 ...)Arrayname = ([index1]=value1

/Etc/profile and/etc/bashrc, interactive and non-interactive, the difference between login and non-login shell, bashrcnon-login

/Etc/profile and/etc/bashrc, interactive and non-interactive, the difference between login and non-login shell, bashrcnon-loginThe online memcached crashes again and still does not get the core file. Check the cause and find that the script for

Total Pages: 541 1 .... 272 273 274 275 276 .... 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.