Shell Getting Started Tutorial: Shell variables
Variable
A variable is a place to store data temporarily, and is a memory space. Bash shell and other programming languages, there is no "data form", which means that the default is not to
Shell function return value, generally in three ways: return, argv, Echo
1) Return StatementThe Return Value of the shell function, which can be the same as that of other languages, returned through the return statement.Example:
#!/bin/bash
In the previous blog, we talked about how to capture web pages in Linux. There are two methods: curl and wget. This article will focus on the Linux Web page capture instance-capturing the top game rankings of Google Play in the world's 12
Features: Implements a comparison of the configuration files under the project name/src/main/resources/online and the project name/src/main/resources/performance (which configuration files are missing from the former, which are the ones that are
This article introduces the shell commands in linux from five aspects, including Shell variables, basic structure of Shell, return value of Shell functions, detailed description of Shell functions, and special variables in Shell, which may be
old boy Education daily one question -2017 year 3 months -awk Array Statisticsprocess The following file contents , take out the domain name and sort the order according to the domain name :( Baidu and Sohu face test
Linux dual-Network Policy Routing script instance-(better)-Linux Enterprise Application-Linux server application information, the following is a detailed description. The dual-network architecture is much more complex than the single-network
Easy-to-make errors with shell scripts1. For i in X y z: This sentence is delimited by a space, and when our $n contains spaces, there will be errorssuch as for i in ' LS *.mp3 ', this ls *.mp3 after execution if there is a space on GGDirect for I
Ext.: http://blog.csdn.net/ithomer/article/details/7954577Shell function return value, generally there are 3 ways: Return,argv,echo1) Return statementThe return value of the Shell function, which can be returned by a return statement, as the return
Reference: http://www.cnblogs.com/dwdxdy/archive/2012/07/25/2608816.html
Often to the stylistic document for line-by-row processing, in the shell how to obtain each row of data, and then processing the row of data, and finally read the next line of
===========================================================================if define a PATH variable in a statement the path that raised the command bug where path change occurs problem
Original script file: INotify +rsync Live Sharing
The latest when looking at a shell data, according to the textbook, but the following error, can not runAs follows, the simple script:#!/bin/bashcat | while Read Line do Echo $line Done awk'{print $}')The following error occurred while
There are a lot of ways, and here are three ways to write:
Writing a:
Copy Code code as follows:
#!/bin/bash
While Read line
Todo
Echo $line
Done
Writing two:
Copy Code code as follows:
#!/bin/bash
Cat
Three, Shell script Development Basic Specification
System functions in 1,/etc/init.d/functions action using the method:
Show XXXX, and the right side shows the green OK Word: action "xxxx"/bin/true
Display XXXX, and the right side shows the red
Method 1:while the most efficient and most commonly used method in the loop.While read line DoEcho $lineDone Note: This is done at the end of the file, as if it were done and then read the file in the same way.Method 2: Pipe method: Cat $FILENAME |
* No Port
* No files are left after the startup.* Generally, there is no problem of UDP single packet 512 bytes. Of course, if you execute amazing commands, I can't* Non-Interactive shell, that is, you cannot use carriage return to write multiple
This article mainly summarizes the entry-level bash from the following aspects:
1. Command history and command completion
2. Pipelines and redirection
3. Command alias and command replacement
4. Edit the command line
5. File Name Configuration
6.
The ReadLine () method reads an entire line from the file. The trailing newline character remains in the string. If the size parameter is not negative, then a maximum number of bytes, including the end of the newline and the incomplete line, may be
The truncate () method truncates the size of the file. If an optional dimension parameter exists, the file is truncated (up to) the size.
The size defaults to the current position. The current file location does not change. Note that if a specified
This article describes how to use the tell () method in Python. it is the basic knowledge of getting started with Python. For more information, see tell () the current position of the object read/write pointer returned by the method.
Syntax
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.