I. Basic Shell syntax1. VariablesBy convention, Shell variables are composed of uppercase letters and underscores (_). There are two types of Shell variables:Environment VariableEnvironment variables can be transmitted from the parent process to the
Links in Linux commands mean that several commands are combined and executed through the operator. In Linux, the link commands are similar to writing short shell scripts in shell and directly executed on the terminal. Link makes automatic processing
for commandfor Var in listDoCommandsDoneCode 2-1[Email protected]:/data# cat demo1 #!/bin/bashfor test in Alabama Alaska Arizona Arkansas ' California Colorado ' do Echo "The next state is $test" Doneecho "The last state we visited be $test"
The meaning of shell variable $#,[email protected],$0,$1,$2 in Linux is explained:Variable Description:$$The PID of the shell itself (ProcessID)$!PID of the Shell's last running background process$?End code of the last Run command (return
DOS batch processing tutorialAuthor: siyizhu Date: 2006-01-19 files with the suffix bat are batch files and are text files. It is rarely used now, but the recovery disks of systems like IBM laptops rely on batch processing. Simply put, it is used to
1. system environment variables after the user logs on to the system $ HOME user's directory $ PATH the directory searched for when executing the command $ TZ time zone $ MAILCHECK check every several seconds
1. system environment variables after
Linux Shell series (3) Shell variable, linuxshell
This article is part 3 of the Linux Shell series. For more shell tutorials, see the Linux Shell series tutorials.As an advanced script language, Shell also supports custom variables. Today, we will
If, case, for, while, until, shellcase in Shell scripts
If condition test statement
If-then-fiIn the if condition test statement, the command following the if statement is run ).If the exit status code of the command is 0, the command in the then
Shell script entry, shell script
There are two ways to use Shell script:
① Interactive: each time a user inputs a command, the Shell immediately executes the command;
② Batch: You can compile a complete Shell script to execute many commands in the
Initial Evaluation
Yesterday, I saw a very interesting method to delete massive files under a directory. This method is from Zhenyu Lee in http://www.quora.com/how-can-someone-rapidly-delete-400-000-files.
He does not use find or xargs. He uses the
Nohup does not stop running commands, while nohup does not.
During the test today, the nohup command encountered the following problems:
[Concert @ mhamanager ~] $ Nohup/usr/bin/masterha_manager -- conf =/etc/appl. cnf &[1] 12501[Concert @
Returnexitbreakcontiue in php. Return, break, and contiue are language structures, just like if statements, but exit is a function. 1. function of exit: Outputamessageandterminatethecurrentscript outputs a return, break, and contiue. it is like an
Recently encountered a process abruptly exiting the issue, because there is no registration signalhandler so no signal is captured.However, from the log to see the status of Init Waitpid returned to 0x008b, before the status is not very
# # #代理 # ## #正向代理 # #The client cannot access the server side, and the proxy accesses the server-side cache data for the client to see.This experiment:Client ip:172.25.27.227Agent machine two x ip:172.25.254.127 172.25.27.127Service-Side ip:172.25.2
One, for commandIn shell programming, sometimes we need to repeat the command until a certain condition is reached, and the bash shell provides a for command that allows you to create a loop that iterates through a series of values, each of which
Reference article: 1 http://blog.csdn.net/wuwenxiang91322/article/details/9259877 changing file permissions via chmod Additional knowledge :1 Linux files have three identities and four permissions, and three identities are:
U: Owner of File
When making a blocking system call, you can set timers for these blocking system calls to avoid waiting for the process to fall into an infinite period. Linux provides alarm system calls and SIGALRM signals to implement this function. To use
The SCP is secure copy, which is used for remote file copies. Data transmission uses SSH1, and SSH1 uses the same authentication method to provide the same security guarantee. Unlike RCP, the SCP will require you to enter a password if needed.
SVN
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.