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 _ $

Summarize shell questions in the group

File22924 183.136.221.76 20020747 119.146.204.15 20019563 61.182.133.37 20019150 112.85.218.29 20018002 113.106.128.3 200123 113.106.128.3 200 File B113.106.128.31.1.1.161.182.133.37 Ladies and gentlemen, how can we print out all the records of

Parameters of shell scripts with conditional Selection

Simple shell scripts for tasks without variables are generally competent. However, when executing some decision-making tasks, it is necessary to include the IF/then condition judgment. Shell script programming supports such operations, including

Usage of Shell functions and source commands

The source command can load another script in one script. The following is an example: First, we define a function script named myfunc. Sh, as follows: #! /Bin/bashFunction Square{Local tempLet temp = $1*$1The sum of squares of Echo "$1 is: $ Temp"

When cygwin executes the shell script, a syntax exception occurs. The most basic if control cannot be parsed.

I learned the shell script today and copied a simple script on the Internet as follows: #! /Bin/bashCygwin = true# Assign values to variables:A = "Hello World" # No space exists on both sides of the equal sign# Print the value of variable:If $

Special symbols of Linux Shell

Compare shell strings and determine whether the string is a numberBinary comparison operator, which compares variables or numbers. Note the difference between numbers and strings. ◆ Integer comparison -EQ equals to, for example, if ["$ A"-EQ "$

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

Linux Shell Parameters

InShellProgramming.You can use parameters.ShellLocation and Internal Parameters 1 ,Location parameters The parameters provided by the system are called location parameters. The value of the location parameter can be used $ N Get, N Is a

Linux shell commands

  Linux Shell is actually a command interpreter that explains the commands entered by users and sends them to the kernel. In addition, shell has its own programming language for editing commands. It allows users to write programs composed of shell

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

Shell (7) User 2.16.doc

Command line parameters, Positional Parameter $0Complete program name(BasenameCommand to remove the path) $1The first parameter, exceeding9Hour$ {10} $ #Number of parameters $ *All parameters in the command line, as a word $ @All parameters in the

Simple shell sorting analysis

First, let's talk about the basic idea of shell sorting: First take an integer D1 less than N as the first increment, and divide all the records of the file into D1 groups. All records whose distance is a multiple of DL are placed in the same group.

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

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

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 -- Select if & case as the condition

1 If #!/bin/bashecho "Please chose your favourite fruit:";select fruit in "apple" "orange" "banana" "none";dobreak;done;if [ $fruit == "apple" ] then echo "you like apple!"elif [ $fruit == "orange" ] then echo "you like orange!"elif [ $fruit ==

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]} ${

Read options and usage in Shell

1. Read options Read can have eight options:-A,-D,-E,-N,-P,-R,-T, and-s. -: Read the content into the value echo -n "Input muliple values into an array:"read -a arrayecho "get ${#array[@]} values in array" -D: Delimiter, that is, the delimiter.

Write an awk script in the shell script to extract data. Note the format. Use shell variables in the awk, convert the numeric strings in the awk to numbers, and compare the strings in the awk.

In awk programming, do not forget that awk processes regular expressions. There are many internal functions, especially string processing functions. Calling these functions can reduce the workload. 1. Format // Note \ There cannot be spaces behind

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

Total Pages: 541 1 .... 500 501 502 503 504 .... 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.