Refer to Linux Command, editor and shell programming (Tsinghua University Press)
When shell is started, it will run the Startup File to initialize itself. The specific file to run depends on whether the shell is a login shell or a non-Login Shell
Author: Leal
Authorization license:
Create sharing agreement
GNU Free Documentation License
Edited by: firehare, dbzhang800
We can use any text editor, such as gedit, kedit, emacs, VI, to write shell scripts. It must start
Shell scripts contain several Unix commands or executeProgram.
1. Run the shell script
There are two ways to run shell scripts. The first method is to use the sh command to take the shell script file name as a parameter. This method requires
The requirement today is to write the creation of all tables to the storage process.
After receiving the script for creating a table, it is silly. There are 60-70 tables, including stored procedures and views.
How can this problem be solved.
Transferred from: Feng yunzhi:Http://witmax.cn/shell-echo-spaces.html
When the echo variable is in shell, only one space is printed in the variable, as shown below:
1 Sh-3.2$ TMP="A B d"2 Sh-3.2$ Echo $ TMP3 A B d
The solution is to add double
1. Install busybox
Busybox is a single executable implementation of standard Linux tools. Busybox contains some simple tools, such as CAT and ECHO, and some larger and more complex tools, such as grep, find, mount, and telnet. Some people refer to
Bash Basics
About commands and command types
Use the hash table for the command Bash to accelerate the next search. To add a frequently used command, use the hash cmdBash executes commands with the same name in the path in the following sequence:
Java code execution shell command
20:48:20
Some system information in Android does not directly provide API interfaces for access. To obtain system information, we need to use shell commands to obtain information. In this case, we can execute
(I = $ J + $ k )) Equivalent to I = 'expr $ J + $ K'(I = $ J-$ k )) Equivalent I = 'expr $ J-$ K'(I = $ J * $ k )) Equivalent I = 'expr $ J \ * $ K'(I = $ J/$ k )) Equivalent I = 'expr $ J/$ K'
Let expressionsExecute one or more expressions. $
1. Linux Command exit-description of the purpose of exiting the Current Shell
The exit command is used to exit the current shell. In the shell script, you can terminate the execution of the current script. If you do not exit, you may continue to
A script developed for colleagues to quickly switch the environment of the home and Unit
Tell application "system events"
Set proxy_dialog to display dialog "proxy module (Ethernet version):" Buttons {"enable proxy Mode 1", "enable proxy Mode 2 ",
1. If statement
If the "if" expression is true, the part after then is executed:Toggle line numbers
1 If...; then2 ....3 Elif...; then4 ....5 else6 ....7 fi
In most cases, you can use test commands to test conditions, such as comparing strings,
Set in cron and execute at every Monday (full backup every Monday, Incremental backup for the rest of the time)
# Vi backup. Sh
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#! /Bin/bash
#
PS1 = '[/[/033 [01; 32 m/]/h:/[/033 [01; 34 m/]/W/[/033 [00 m/]/$'
A brief explanation:The useful information is as follows:PS1 = '[/h:/W]/$'/H display the current host name/W display the current directory/$ Prompt[] For beauty
The result is as
If you want to know the source code of HDFS, you can read his javaeye from Brother Cai bin.
Sorry, I used the word "mysterious killer" because it really hurt me so much that I took a lot of energy to pick it up.
Recently, when testing hadoop, The
This article is the seventh chapter of "Learning the bash Shell" 3rd Edition, "Input/Output and Command-Line Processing. Our goal is to read books thin.
Echo and printf are both written. read is used for reading. The format is:
ReadVar1 var2...
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 define variables and
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.