I've been learning Linux and shell scripts lately. English has not been returned to teachers for many years. Encountered the words do not understand to open a Word bully Web dictionary to translate, a long time more uncomfortable. Accidentally found
"Copyright notice: Reprint please keep Source: Blog.csdn.net/gentleliu. mail:shallnew at 163 dot com "There are many files in the Linux system, such as configuration files, log files, user files, and so on. The file contains a lot of information,
1. FunctionsShell functions, which are used to customize a segment of a program. To simplify the code. Grammar:Funtion fname () { //do something}The shell is top-down, executed from the left and right. So the definition of the function needs to
Not long ago, once searched a blog is to read the configuration file, http://www.cnblogs.com/bo083/archive/2012/11/19/2777076.html, used to now, feel very convenient, thank the author.Now, a web interface is required to allow the user to modify a
A function is a block of script code that is given a name and can be reused anywhere in the code. Whenever you need to use such a block of code in your script, simply reference the name of the function that the block is assigned to.Create a
Today, the company LD asked to write a small script to monitor whether a process exists and how to exit the script. If it does not exist, send an email to the specified mailbox, I use the running status of the daemon to determine the connection
1. Delete the BOM and execute the following command under VI.
: Set nobomb
2. cause:
The so-called Bom is the byte order mark, which is a Unicode character that usually appears at the beginning of the text to identify the byte order
Variable
Local variable: similar to local variables, only valid for the current Shell Process
Environment variable: applicable to all sub-processes generated by login Processes
Location Parameter: used to pass parameters to shell scripts,
Bytes --------------------------------------------------------------------------------------------------------
I. History commands
History # view History commands
History-C # Clear history commands
History-W # exit without waiting. directly
Linux Shell Programming
1. What is a bash shell variable?
Shell variables can be divided into two types:
Local variables and environment variables.
Local variables are only available in the shell that creates them. Environment variables can be
[Copyright statement: reprinted. Please retain the Source: blog.csdn.net/gentleliu. Mail: shallnew at 163 dot com]Since awk is often used in shell scripts, some variables in shell scripts must be passed to awk for use. This section describes how awk
Hbase is an open-source implementation of Google bigtable. It uses hadoop HDFS as its file storage system, hadoop mapreduce to process massive data in hbase, and zookeeper as a collaborative service.1. IntroductionHbase is a distributed,
Last week, the boss pressed down the task and asked him to write a Web Crawler to crawl the data information of an industry website. Since I only use the shell programming language, other programming languages have never been involved, so I can only
Shell supports custom variables. When defining a variable, the variable name does not contain a dollar sign ($), for example:
Copy text-only new window
Variablename = "value"
variableName="value"Note that there is no space between the variable
Use of shell Learning () and {}In shell command line, the average person may not care much about the differences between the two pairs of symbols () and,Although both of them can group multiple commands, the technical details are quite different:()
[Shell] crontab executes the task and calls the shell script. The relative path cannot be found. crontabshell
The scenario where the problem occurs is probably
1 cron calls a python script
2. In the python script, call a shell script (for log
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.