Unix/linux Shell Programming Combat: Using embedded documents here documents
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
Use shell batch to change file suffix names
There are times when you need to change the log files in the server to a different uniform format, and it's a good idea to use your scripts automatically. In this paper, the JPEG format file is changed to
Use/dev/null 2>&1 to do this. This command means that the standard output and error output are all redirected to/dev/null, that is, all the information that is generated is discarded.
Here's a look at the difference between command > File 2>file and
My logic is to execute a shell script in the CGI that shows the WiFi data in the script-generated text in the browser. But the browser has been unable to display the normal, tangled for several days.
The shell script probably does this:
#! /bin/sh
IntroductionIn this experiment, you will implement the create process and call library functions to load and run executables on disk. Run the shell on the console of the operating system kernel at the same time. These features require the
Recently, a Hadoop cluster was installed, so the HA,CDH4 that configured HDFS supported the quorum-based storage and shared storage using NFS two HA scenarios, while CDH5 only supported the first scenario, the Qjm ha scenario.
About the installation
1. Signal ProcessingLinux uses signals to communicate with processes running in the system.Signal Value Description1 SIGHUP Suspend process2 SIGINT Terminate Process3 Sigquit Stop Process9 SIGKILL Unconditional Termination processSIGTERM terminate
The shell can often see: >/dev/null 2>&1 eg:sudo kill-9 ps-elf |grep-v grep|grep $1|awk ' {print $4} ' 1>/dev/null 2> The result of the/dev/null command can be defined in the form of%> output/dev/null represents the empty device file ">" for
In shell development, when we connect to FTP or passwd or sudo, we need to enter the password manually. This is obviously inappropriate for automation. And expect's strong interaction model solves this problem. I am involved in this work, the
Pipe symbol |Used to input the output of the previous instruction as the last instruction[email protected]]# Cat 1.txt | Wc-l2[email protected]]# cat 1.txt1.txt2.txt[[email protected]]# find./-type F | Wc-l37Job ControlWhen the process is running,
Only the environment variables are placed in the configuration file to automatically take effect each time the power-on. SOURCE command: Let the configuration file take effect directly without logging off or logging back in.Source configuration file
Use of related software:#########################################################################The above is the use of related software! The following is a non-secret landing of the preparationBetween the two servers, the configuration of the
If statement 1.1 if statement explanation
If is a judgment statement, if the action is similar to [], the general judgment is more or the execution of the statement is more, then will use if
1.2 If format
First format
if [
Simple shell programming in Linux
Transfer from: dynamic network Production Guide www.knowsky.com
Basics of shell script writing
From scheduled backup to simple command execution, Linux shell scripts can execute various
// -- DOS dead guest star, which can break the endless loop of the program. Press Ctrl + ESC to immediately return the dead program to the DOS shell.
Code segmentAssume Cs: code, DS: CodeOrg 100 hStart: JMP installOldint dd 100 h DUP (?)Oldmcb dd 10
1. Enter the Ubuntu system and set up the android development environment.
1. Update the software source before installing the new system. In this way, when we use some software, we can directly use the tab key to complete the name of the software
I used to read some articles and learn more about them. I usually write a simple command combination, but I have never written complex scripts. Recently, I wrote a script to restore the data and found that the optical field does not work properly.
/*
Delphiscn eternal snow sans shell Version 1.0
This backdoor is written by delphiscn. It is support for Windows NT/2000/XP/2003.You can use a NC to control a remote computer which is runing with this software.
Complied and tested in Windows XP SP2
Through the previous study, we learned what shell is and its classification and functions. Now we will learn how shell executes the program, that is, the first function of shell. Here we first understand how shell executes the program, learn 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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service