Shell script learning-Why shell programming

Shell is a command interpreter. It is an insulation layer between the operating system kernel and the user. To be precise, it is alsoA powerful computer language. A shellProgramIt is called a script and is a very easy-to-use tool.Combine system

Overview of Shell and bash

Shell is an interactive command interpreter. Shell is independent of the operating system. This design allows you to flexibly choose the appropriate shell. Shell You can type a command in the command line,After being explained by shell, it is

One or two shell scripts

Must begin #! /Bin/sh start Start a line of comment # $ # Indicates the number of parameters input by the script $1, $2,... indicates 1st parameters, 2nd parameters ,... Shift is used to move the $ n parameter to the next parameter, which is

Shell metacharacters and shell internal variables

Shell metacharacters and shell internal variables Shell metacharacters > Prog> file redirects the standard output to the file> Prog> file: attaches the standard output to the file.| P1 | P2 uses the P1 standard output as the P2 standard

Replace Linux Shell Parameters

The $ symbol in Bash is used to replace the parameter name with the value represented by the parameter. For $, braces are optional, that is, $ A and $ {A} represent the same parameter. $ {} There are several expressions with colons: $

Shell [Command Execution arithmetic extension/parameter processing preliminary usage]

1. Arithmetic Extension #! /Bin/bashx = 0 while ["$ X"-ne 10]; doecho $ xx = $ ($ x + 1) doneexit 0 2. Parameter Extension #! /Bin/bashfor I in 1 2; domkdir $ {I} _ tmpdoneexit 0 3. Processing Parameters #! /Bin/bashunset fooecho $ {FOO:-bar}

Explanation of sed commands in makefile (Shell)

  Sed (a stream editor) Four spaces: input stream, pattern buffer, output stream, and hold BufferThe basic operation process is:(1) Put the current row of the input stream into the pattern buffer, and then the pointer of the input stream points to

ADB :) ADB shell AM

You can use the am command to start an existing app in the system in the command line mode. The ADB shell enters the command line. Press enter to view the help information about AM. The meaning of each parameter is not described here. Just give a

Chapter 9 Study Notes of Linux Command Line and shell script Programming

Chapter 9: Use the editor 1. Vim Editor (For more details, see #1, #2, #3) Start:Vim or Vim File Two editing modes:Normal Mode and insert mode. Normal Mode is enabled by default. Move the cursor: H: 1 character left J: move down a row K: Move up a

Use shell array, good, keep learning later

I don't know when I wrote something, But I was found by archaeology when I sorted out the documents. I just smiled at those people who were bored. If the errors in this article cause all mental losses to you, contact the insurance company! Of course

Shell Command Line shortcut in Linux

eol

CTRLKey bound_____________CTRL +-Jump to the start of the lineCTRL + B-Move back a charCTRL + c-Terminate the commandCTRL + d-Delete from under the cursorCTRL + E-Jump to the end of the lineCTRL + F-Move forward a charCTRL + k-Delete to EOLCTRL +

FTP folder transmission shell script

######################################## ######################### ######################################## ######################### Ftp_download_file (){ EchoEcho begin: Download $1: $2...Echo Sleep 0 FTP-I-n Open $1User administratorBinMget

Bash command and shell script Summary (3) command

@ Rigorous use of set @ Set-eux -E. If the command returns a non-zero value, exit immediately. -U when the execution parameter is included, the unset variable is used as the error handling (if the extension attempt appears in the unset variable, the

Location parameters in bash shell $ #, $ *, $ @, $0, $1, $2... And special parameters $ ?, Meaning of $-and so on

Location parameters in bash shell $ #, $ *, $ @, $0, $1, $2... and special parameters $ ?, Meaning of $-and so on In bash shellOftenWhen you see some special symbols, I will collect them for reference: Location parameters:For details, see ABS

Example of using the while loop in Shell

#! /Bin/sh # Filename: 2.sh B = 9 E = 15 Tmpb = $ B While [$ tmpb-Le $ E] Do Echo $ tmpb # Tmpb = 'expr $ tmpb + 1' // OK Tmpb = $ (expr $ tmpb + 1) Done After the script is executed, the output result is: 9101112131415   Note: The

JDK installation in Linux, environment variable settings in different shell environments for different users

  Install JDK in Linux Download the original JDK version of Sun: http://java.sun.com/products/archive/. you can download any JDK of sun. I used to find jdk1.4.2 _ 08 for a long time and I couldn't find it. I accidentally found this portal useful, so

Linux Shell Regular Expression

In the Linux Shell environment, two regular expression rules are provided. One is the basic regular expression (BRE), and the other is the extended regular expression (ERE ).The syntax list of these two expressions is as follows. Note that, if meta

Linux system resource load is too high and Apache shell script is automatically restarted

Linux system resource load is too high and Apache shell script is automatically restarted   When we routinely maintain Apache Web servers in Linux, the endless loop caused by crawler crawling cannot jump out, or the collection of data from peers

Number of lines in the shell string

1. query the row number of the string. Grep-n "XXX" str.txt #-N print the prefix of the number of lines where the character "XXX" is located in the file "stringstr.txt" Example: Str.txt XxxYyyZzzXxx Enter the SEARCH Command: grep-n "XXX"

Next-generation Windows Shell

A wonderful article on arstechnicaCommentThe replacement of cmd.exe under Windows is described in detail. Microsoft command shell, also known as MSH, and the project code is monad. From the comments, mshdoesn't just make cmd.exe unable to look

Total Pages: 541 1 .... 454 455 456 457 458 .... 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.