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

A shell to facilitate installation of makefile files

#! /Bin/sh Arg_count =$ # If [$ arg_count-EQ 0]; then Echo "error: Enter the file name to install ." Echo "Usage: Install file 1 [file 2 file 3 File 4 File 5... file N]" Exit Fi For filename in $ *DoIf [-F $ filename]; thenTMP = install _ $

Shell script debugging-run log 2

Shell script debugging-run log 1   This article mainly describes how to output debug logs in shell scripts.   C/C ++ debug log In C/C ++, _ file __, _ FUNC __, _ line _ indicates which log of the current row comes fromSource codeWhich

Shell (8) sed-gawk.doc

Sed Reads a row of data, matches the edited command, modifies the data, and then outputs itOutput Basic Format Sed options script file -EExecute multiple commands -FSpecifies the command file, where the command does not need to";"Split

Shell (3) redirection .doc

Normal 0 7.8 磅 0 2 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable{mso-style-name:普通表格;mso-tstyle-rowband-size:0;mso-tstyle-colband-size:0;mso-style-

Shell if statement Parameters

◆ Parameter description-B. returns true if the file exists and is a block file.-C: returns true if the file exists and is a character file.-D. If pathname exists and is a directory, true is returned.-E: returns true if the file or directory

Accurately clear the Squid cache using shell scripts

This script was modified on the cache cleanup script of Zhang banquet, mainly to add the if option, and select the address of the cached file based on the $1 parameter type (because $1 is not fixed, sometimes it is a specific JPG type, sometimes it

Common ADB shell commands and database query methods in Android

The Common commands of ADB shell in Android and the methods for viewing application database information under cmd are as follows: CMD -- ADB shell: Enter the shell command interface of the simulator. Ls displays all the file directories in the

Insert sorting, Bubble sorting, select sorting, shell sorting, quick sorting, Merge Sorting, and heap sorting

Various sorting implemented by the Java language, including insertion sorting, Bubble sorting, selection sorting, shell sorting, quick sorting, Merge Sorting, heap sorting, and sortutil. Insert sorting: Package org. rut. util. algorithm.

Hide cmd command line running using wscript. Shell object

This blog (Http://blog.csdn.net/livelylittlefish) Post the notes prepared by the author (, Xiaoyu) on the relevant research and study content. You are welcome to correct them!   Hide cmd command line running using wscript. Shell object   1. wscript.

Shell (4) mongo.doc

1) Create FunctionName { ... } Or: Name (){ ... }   2) Call Use the function name directly. The function can be called only after it is defined; When a function has the same name, the new definition will overwrite the old definition and no

Shell (10) commonly used command. Doc

Ls -L, show the hard link count; -I, show I-node -H, human readable -T, sort by modify time -S, sort by size -R, -- reverse -R, show content of sub-Dir -V, sort by version  CP -P,Retain source file attributes, such as the modification time -L,

Shell basics 5: Input and Output (echo, read, Cat, pipeline, Tee, redirection, etc)

Shell basics 5: Input and Output (echo, read, Cat, pipeline, Tee, redirection, etc) All the environments below are tested in RedHat Linux9In Linux, to make the Escape Character take effect, you need to add the parameter-eStart with the echo

Shell programming in Linux (cainiao notes)

A simple example: #!/bin/bashecho "What's your favourite star?"select var in "Leehom" "Vae" "Jay" "Jolin"; dobreak;doneecho "You have selected $var" Running result: root@ubuntu:~# ./star.shWhat's your favourite star?1) Leehom2) Vae3) Jay4) Jolin#

Some shell commands ~

Bash is used for shell programming. Bash is free and easy to use. Bash-Bourne again shell File named myshell. Sh Before executing a file, you must first obtain the following permissions: Chomod 777 myshell. Sh 1. display file

Shell ----- Array

Let's take a look at an example: #!/bin/basharea2=(zero one two three four)echo "Origin is :"echo ${area2[0]} ${area2[1]} ${area2[2]} ${area2[3]} ${area2[4]}area2[1]=1area2[4]=4echo "After is :"echo ${area2[0]} ${area2[1]} ${area2[2]} ${area2[3]} ${

Shell Condition Statement

I. Shell Condition Statement (if usage) If statement structure [if/then/Elif/else/FI]   If condition test statement Then Action [Elif Condition Action Else Action ] Fi   If you are not clear about the conditional test statement, refer

Shell if else

Example: #! /Bin/sh Mypath = "/var/log/httpd /"Myfile = "/var/log/httpd/access. log" # Here, the-x parameter determines whether $ mypath exists and has executable permissions.If [! -X "$ mypath"]; thenMkdir "$ mypath"Fi # Here, the-D parameter

Shell usage record

Check/set system services chkconfig Display Process dynamics Top. Common performance analysis tools in inux can display the resource usage of various processes in the system in real time, similar to the Windows Task Manager. Detailed explanation

As3 shell flight and collision Algorithm

Import flash. display. Sprite;Import flash. display. stage;Import flash. Events. event;Import flash. Geom. Point; Import zujian. tank; Public class paodan extends Sprite{Private var ball: ball;Private var point: Point = new point ();Private var DX:

Total Pages: 541 1 .... 422 423 424 425 426 .... 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.