1.8 using Aliases
aliases in Linux are the equivalent of shortcuts in Windows, and using aliases can save users from having to enter a long sequence of commands.
1.8.1 Creating temporary aliases (shortcuts)alias new_command=‘command
1, consider the following requirements, in the main shell execution command, enter the other command, the input after, want to as the input of the command, instead of the main shell input, how to do?2, use 3. The EOF here is just a delimiter and can
Linux operating system can be divided into shell and kernel two parts, kernel is the kernel, provides the core functions of the operating system. The shell is the shell, which is connected to the kernel (kernel) and the user. This means that the
1. View versionCat/etc/debian_version7.82, look at the memory (my side is 256MB memory swap divided by 4G)Free-mTotal used free shared buffers CachedMEM:231 124 106 0 8 79-/+ buffers/cache:36 194swap:3814 0 38143. Using stress to simulate the
Next look at some special variables$? : Receives the return status code of the previous command, so that you know whether the previous command was successful,If the previous command succeeds, the return status code is 0, and if the previous command
#/bin/Bashhint () {Read-P"Press Enter Tocontiune:"}check_a () {PS-ef |grepCxiang|awk '{for (i=1;i'Text1//use grep and awk to filter the process into Text1. sed '/^.*/s///g'Text1 >text3//delete Text1 in front of empty row in Text3grep-VWF Text3 Text2/
Tag: Shell time expr wait Shell single, multi, control process use method one, 100 tasks using 200 seconds (normal completion) cat process2.sh #!/bin/bashfunction aaa () { start= ' date "+%s" for ((i=1;iThis article is from the "7928217" blog,
Background:There is a source package that contains many subdirectories and makefile, and the packed package is too large to be deleted and then packaged by all the binaries created by make.Demand:Therefore, make clean is required to clear all the
Combat 1: Enter 2 integers to determine the sizeThree ways to achieve:1 defining a variable 2 script parameter 3 read read-inThe first step, give the user prompt, let it enter an integerThe second step is to determine that the first value and the
First, describeThe Linux system is connected remotely on the SECURECRT terminal, and the HBase shell script is used for distributed database operations, but you cannot modify the script that entered the error using the DELETE key.Second, the
Create a thread to refresh the current system timeNew Thread () {public void Run () {Here is another separate thread, not a UI threadDisplay Dis=shell.getdisplay ();while (true) {Non-UI thread access UIif (!shell.isdisposed ())//whether the current
Shell disrupt file lines
The idea is to generate a random array, and then output the row in the file according to the array elements. 1. It is very easy to generate a random array. It was a little difficult to start using it for the first time. The
Shell breaks down file lines,
The idea is to generate a random array, and then output the row in the file according to the array elements. 1. It is very easy to generate a random array. It was a little difficult to start using it for the first time.
Shell programming notesShell programming:Bash variable type:Environment VariableLocal variable)Location variableSpecial variables (built-in)Local variable:Varname = value: applies to the entire bash process;Variable naming rules:1. It can only
Here documentation in Shell,
We know thatlinuxCommand Line operations can all be placed in the file. After the executable permission is granted, the file can be changed toshellScript. But if we talk to some programsInteraction,shellScripts cannot
Shell programming tmpwatch, shelltmpwatch
As a system administrator, you often need to regularly clear files with certain rules, such as expired logs, expired archives, and backed up files.
If you use certain matching rules to find these files 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.