Command lineWhen users log on to the Linux system, they can see a shell prompt that identifies the start of the command line. The user can enter any commands and parameters after the prompt. For example: $ date 211 01:34:58 CST 1999 $
Here document is one of the ways in which you define block variables in bash.
The form of the definition is:
Command
...
...
...
HereIts role can be used to define a variable, the command and the content between here using the way to input to the
1. Order Introduction
①locate
The Linux Locate command is used to find documents that match the criteria, and he goes to the database where the document and directory names are stored, looking for documents or directories that conform to the
There are two ways you can execute a shell script under Linux:
Note: This article is reproduced from: How to execute shell script under Linux
1, with the shell program execution script: According to your shell script type, choose Shell Program,
The following command lets you see which CPU the process is running on.
vostro-270s:$ Ps-elo RUSER,PID,PPID,PSR
Root 3 2 0
Root 5 2 0
Root 8 2 0
Root 10 2 0
Root 11 2 0
Root 12 2 0
To explain the above command, the PS command displays the status
[]linux Shell gets the absolute path of the currently executing script
A common misconception is to use the PWD command, which is "Print name of current/working directory," which is what this command really means, the current working directory,
#man Date can see the Help file for date#date Get the current time#date-D " -1week" +%y%m%d access to the Sunday period (day,month,year,hour)#date--date= " -24 hour" +%y%m%d dittodate_now= ' date+%s ' shell script assigns variable values%%% OUTPUT%
First, here documents (embedded documents)Here, documents. As a way of redirecting, instructs the shell to start reading the output at the current location of the source file until it encounters a text row that contains only one word. All lines of
Shell command to determine whether a file or folder exists, first look directly at the example:
#!/bin/sh
#判断文件存在 to determine if the folder
testpath= "/volumes/macbookprohd/mr.wen/08 shell command"
testfile=/volumes/ macbookprohd/mr.wen/08 shell
After HBase starts, the HBase shell runs into the hbase shell command line
1. Create a table
Create ' user ', ' FName ', ' LName '
User to indicate that FName and LName are column names
2. Inserting a piece of data
Put ' user ', ' 1 ', ' FName ',
I think awk is a good thing under Linux, it's very handy to work with some text files. Under Linux, it's often the case that you deal with the shell, so the variables between awk and the shell are sometimes necessary, so simply summarize.
using
zabbix3.0.4 add monitoring of the process:
method One: Monitor with custom commands
Main idea: Through Ps-ef|grep sdk-push-1.0.0.jar |grep-v grep|wc-l This command to determine whether the process Sdk-push is running, if not equal to 1 means
Original address: http://blog.zol.com.cn/2322/article_2321763.html
$ () and ' (anti-quote)
In the bash shell, $ () and "(anti-quote) are used for command substitution.$ echo the last Sunday was $ (date-d "last Sunday" +%y-%m-%d)Get the date of the
Haven't written a blog for a long time, recently work needs to study the following features:
1: Print the Qdebug information to the QT window
2: Save Qdebug information to local
3: Execute shell Script
4: Output terminal information to QT
1, Special shell variable$# the number of arguments passed to the script$* displays all parameters passed to the script in a single string$$ the current process ID number for the script to run$! the ID number of the last process running in the
The Linux shell can be user-defined functions and can be called casually in shell scripts.The functions in the shell are defined in the following format:[Function] funname [()]{Action[Return int;]}Description1, can be with function fun () definition,
1, Shell 1.1, IntroductionThe shell is meant to mean "shell", a "shell" program that surrounds the Linux kernel, and all the tasks that the user completes on the operating system are implemented through the interaction of the shell with the Linux
As with the current development language, there are some grammatical differences!
The
Bourne Shell is a standard UNIX shell that was formerly used as a management system. Most of the system administration command files, such as RC
1, test: the detection of the expression is established, the return value is 0, otherwise, not 0Method:1) test expression2) "Expression"2. File test:-D: Whether it is a directory-F: Whether it is a file-E: whether there is-r: Whether Read permission
I. Functions in the shellThe function is to organize a piece of code into a small unit, and give the small unit a name, when the code is used to call the name of the small unit directly.Format:function f_name() { command}Note: The
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.