Shell Programming Basic syntax

When writing a shell script, the first line to add: #!/bin/bash, because Linux is not only bash a parser, there are other, they have some differences between the syntax, so it is best to add this sentence, tell the system to use this parser.One.

Shell script programming related 3

1. Display Normal string:"It is a test"The double quotes here are completely omitted, and the following commands are identical to the previous instance:It is a test 2. Show escape characters"\" It is a test\ ""The result will be:"It is a

Shell Tutorial Variables

1.Shell variable 1.1 definition variableYour_name= "Http://www.cnblogs.com/uniquefu"Note that there can be no spaces between the variable name and the equals sign, which may be different from any programming language you are familiar with. At the

Shell Programming-test Command (VI)

The test command is commonly used to check whether certain conditions are true.Numerical test-EQ: Detects whether two numbers are equal, equal returns True-ne: Detects whether two numbers are equal, not equal returns True-GT: Detects if the left

6.5 Shell Arithmetic calculation

6.5 Shell ArithmeticThe shell allows expressions to be evaluated inside, and can be used in the following ways: (Medium, let, and the declare command with the-i option.)Only fixed-length integers are computed, and overflow is not checked, except

Shell Learning--terminal printing

1. Echo1.1, by default, Echo adds a line break after each call1.2, the content to be printed, you can use single quotation marks, double quotation marks or direct printing, different ways, have their own restrictions1.2.1, using the non-quoted Echo,

Shell 3 Array

Shell Arrayshell支持一维数组(不支持多维数组),并且没有限定数组的大小。Defining arraysshell中,用括号来表示数组,数组元素用空格分隔,下标从0开始Mode 1 数组名=(值1 值2...值n),如array_name=(value0 value1 value2)Mode 2 array_name=(value0 value1 value2 )Method 3 defines the value of the array

Redirection comment in Shell

00 00 1 ** echo "">/usr/local/Apache/logs/error_log>/dev/null 2> & 1>/Dev/null redirects the output to/dev/null, which is an empty device, that is, ignoring its output.2> & 1 refers to outputting errors to the standard output. If debugging is

CMD uses shell commands to change the permissions of Android files (real machines)

CMD uses shell commands to change the permissions of Android files (real machines). The commands executed are as follows: ADB shell ---> press ENTER ----> su ----> press ENTER -------> chmod 700 data ----> press Enter. Then, the permission for the

The ADB shell startup method in Ubuntu solves your troubles.

Are you still worried that you can only compile the source code in the Ubuntu environment, but cannot directly debug the ADB shell? The following method can solve your problem: If your environment already has ADB, My ADB has been copied to

Universe in Shell

Hawking wrote, good. Colorful pages look good, just like watching a picture. However, the text used is a bit esoteric to me. Like the past, we are still pursuing knowledge, exploring the mysteries of the universe, hoping to know the past and the

Enterprise Unix shell behavior audit system-secondary development based on enterprise audit shell (EAS)

For more information about EAS, see Enterprise Unix shell behavior audit system-enterprise audit shell (EAS) and Use eash to implement shell audit in Linux. Due to the company's needs, I have performed secondary development based on EAS, and some

Batch pack IOS jailbreak packages by Shell

Often, a software IOS jailbreak package requires many channels. I used to modify the channel number once and re-package it. However, as more and more channel numbers become daunting, you can only find one automatic packaging statement. You can

After Onda v811 is upgraded to 4.22d, the shell can use the root permission to control the file system.

After Onda v811 was upgraded to 4.22d, it was successful to use the master to root the machine. Baidu root is a floating cloud. It's worse than the flash master of a small company in Shenzhen! After root, log on to shell or shell @..., not root @...

Use the shell for loop command in Windows

This article is great for people who have been using bash in Linux for a long time. The for command has powerful functions! Self, http://hi.bccn.net/space-21499-do-blog-id-13524.html For allows some commands that do not support wildcards to operate

How to calculate the intersection and difference set of two files in Linux Shell

Assume that the two files file1 and file2 are represented by a and B. The content of file1 is as follows: A B C E d The content of file2 is as follows: C d A C There are basically two methods: one is the comm command and the other is the

Use environment variables in crontab (you can manually execute shell scripts, but not in scheduled tasks)

How to reference defined environment variables in crontabA shell script/root/test/Shell/test_crontab_env.sh uses an environment variable test_crontab_env = test_crontab_env.Test_crontab_env exists in/etc/profile.For example:#! /Bin/bashEcho "'date +

Install macports on Mac OS X lion (which makes it easier for you to use MACOs shell)

Reprinted please famous from: Shi Shang Liu Jing Hong poechantcsdn blog, the original link: http://blog.csdn.net/poechant/article/details/7213209 0. What is macports? Macports is an open-source project initiated by the open-source community to

Shell script to open the IE shortcut URL File

[InternetShortcut]URL=http://www.baidu.com/IDList=BEST=0[{000214A0-0000-0000-C000-000000000046}]Prop3=19,2 The above is the code for opening the Baidu shortcut file in text format saved in windows. The format of all URL files is basically the same.

Shell (5) Regular Expression .doc

Regular Expression Engine The special characters that describe the matching mode and the general characters;   Bre POSIXBasic regular expression,EreExtended regular expression;GawkSupportedEre,SedNot supported.   1) Regular Expression mode: L

Total Pages: 541 1 .... 305 306 307 308 309 .... 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.