Summary of Shell transformation

The I-III section deals only with bash ... For others, see section IV ... I: The use of obase, IBase and BC: IBase is the input of numbers, and obase is the output of the number of the system. Well remember, I am input,o is output.Note that the F

Solution to the "integer expression expected" of the shell command __shell

In the shell script, when comparing with parameters, such as "[$temp-eq" IPhone "]", there may be an "integer expression expected" error. This is because these parameters:-GT,-lt,-eq comparisons are both numbers and variables, so the variable temp

Special variables in the shell $ $ $# $$ $! $? meaning __shell Script

$: The name of the executing script $* and $@: Return all parameters to $#: The number of arguments $_: represents the last parameter of the previous command $$: The PID $! that represents the command that was last executed: The PID $?: A flag that

Shell Scripting Learning Notes-variable usage and input and output

1. Definition of variables 1.1 Variable names can consist of letters, numbers, underscores, but numbers cannot be the first character of a variable name. 1.2 Define the value of the variable by assigning the symbol "=", e.g: Myname= ' Test ', String

Shell Script Programming Basics

1, write script/root/bin/systeminfo.sh, display the current host system information, including hostname, IPV4 address, operating system version, kernel version, CPU model, memory size, hard disk size2, scripting/root/bin/backup.sh, can be

Shell programming tips

This note is based on the built-in shellcontrol of Delphi 7Source codeAnalysis, read a lot of MFC implementation class Explorer Shell controls, BCG, cjlib, but do not have Delphi shell control perfect, for example, tshelllistview can automatically

Some common shell commands

It is for entertainment only and is not responsible for the result of misoperations. 1. Remote copyRoot@192.168.1.38:/f/u/C/k.txt.Root@192.168.1.38 SCP-r-p1234:/beauty. 2. Force Overwrite\ CP-r/data/data1 3. synchronous copy of

Control Flow Structure in shell script

I am used to the C/C ++ programming environment, and then switched to shell programming, there is always a strange feeling. The general if-then-else Function Format in shell is as follows: If condition 1 Then command 1 Elif condition 2

Shell operations and simple programming (6)

Linux Shell Programming In fact, the interactive interpretation and execution of user input commands as a command language is only one aspect of the shell function, shell can also be used for program design, it provides a variety of methods to

Principle and collective implementation of shell sorting

Hill sorting was named by computer scientist Donald L. Shell. He discovered the hill Sorting Algorithm in 1959. Hill sorting is based on insert sorting, but a new feature is added, which greatly improves the execution efficiency of insert

Shell conditional expression

F statement format If conditionThenCommandElseCommandFi, don't forget the end. If statements forget the final fiTest. sh: line 14: syntax error: unexpected end of fi Three conditional expressions of if

Learning Linux (2): Understanding shell and some commands

Shell: Shell Baidu Encyclopedia: Baidu. It receives user commands and calls corresponding applications. It is also a programming language. As a command language, it interactively interprets and executes user-entered commands or automatically

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.

Shell: Monitoring script

Introduction: for some programs that need to run for a long time (such as server programs), it is necessary to write a monitoring program to enable automatic restart upon unexpected exit. This function can be implemented through a simple shell

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 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#

Differences between for and while in Shell

Find out the difference between for and while, and write out the memo. Script: File =/home/hadoop/phrases.txt for content in 'cat $ {file} 'Do phrase = 'echo $ {content}' echo $ phrasedone The phrases.txt file contains the following content:

Summary of common shell script commands for later use.

#!/bin/sh#for exm to test# ./check.sh 12 36 25 12 453 1 2 3 RETVAL=0SRRVER_START=1SRRVER_STOP=2DNS_STATUS=1dnsCheck(){ while test "x`pidof dnsmasq`" != x ; do echo "check DNS status...................."

Linux bash shell learning notes

1. Bash script parameter Processing Bash parameters can be accessed by adding a numerical number to $, where: $ # Indicates the number of Script Parameters $1 indicates the script's 1st parameters. $2 represents the 2nd parameters of the

Shell script usage Summary

Document directory 1. Use of shell Array 2. awk Array Operations 3. shell parameter problems 4. How to output single quotes in awk 5. Methods for connecting awk and shell strings 1. Use of shell Array Value assignment: All = (6 5 4 3 1 8 9 10)

Total Pages: 541 1 .... 363 364 365 366 367 .... 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.