Shell Command: ls-Al> out. log 2> & 1
Command Description: redirects the 1 (stdout) Output and 2 (stderr) output of the shell command to the out. log file.
Explanation: ls-al. After a commond statement is executed, there are two types of output:
First, write some basic syntax:
1. String judgment
Str1 = str2
True when two strings have the same content and lengthStr1! = Str2True when str1 and str2 are different-N str1: true when the length of a string is greater than 0 (the string is not
Linux ShellVariable auto-increment is often used when writing a loop. Now let's summarize the auto-increment method of integer variables.As I know, bash currently has five methods:1. I = 'expr $ I + 1 ';2. Let I + = 1;3. (I ++ ));4. I = $ [$ I + 1];5
1. Description
Top selection parameters
2. Option
①-B runs in batch mode, but cannot accept command line input;
②-C: displays the command line, not just the command name;
③-D N indicates the interval between two refreshes. For example,-D 5
1. ChildProgramOnly the environment variables of the parent program will be inherited, And the subroutine will not inheritDefinitionVariable.
Custom variables: declare them as environment variables through export
Convert environment variables to
Bitwise operator.
Bitwise operators are rarely used in shell scripts..Their main purpose seems to be to operate and test from sockets
Read variables. "Bit flipping" is closely related to the compilation language , for example, C/C ++ , in
There are basically three ways to execute shell scripts:
(1) input is directed to the shell script.
The general form is Bash For example, bash (2) Use the script name as the parameter. The general form is:
Bash Script Name [parameter]
For
# Set the dump file size limit. Ulimit-C unlimitedcd/home/linbc/build/bin # Check whether the dump Folder does not exist. If [! -D ../dumpfile] Then ECHO "Create dumpfile fold" Mkdir ../dumpfilefi # Search
My
_ App1: whether it exists
It has been a while before the first post has been changing the series. At that time, I was just in touch with shell scripts and will be used temporarily at work. Learn the same thing, love the same, step by step.
1. Single and Double quotation
First article written since last timeArticleTwo months have passed. This article describes how to obtain the decrypted il bytes.Code.Let's review the previous article. In the previous article, we mentioned that "After infacemaxtocode. startup is
In the past, when grub information on the machine was lost or damaged, use rescue mode to enter and then reinstall grub-install/dev/SDA.For some reason, grub-install/dev/SDA may encounter more or less problems during execution. We can also use
The shell kernel is an interface between the user and the kernel. The shell protects the internal kernel. The shell programming is similar to the batch processing file in DOS, which is called shell script and shell command file. SlaveProgramFrom the
$0 indicates the execution name and Script Name of the program.$ N the nth parameter value of this program, n = 1 .. 9$ * All parameters of this program. This option can contain more than 9 parameters.$ # Number of parameters in this program$ PID of
[-A file] true if the file exists.[-B file] If the file exists and is a special block file, it is true.[-C file] If the file exists and is a special word file, it is true.[-D file] If the file exists and is a directory, it is true.[-E file] If the
ihttp: // forum.soft32.com/linux2/run-shell-script-appstop-icon-ftopict51996.html am using KDE as my user interface. how can I create a shortcut icon on the desktop that will run a shell script in a shell window? I want to be able to click an
2.1 What is Shell
Interpreted language, which is not suitable for jobs that are picky about execution time or have a large processor.
Shell is a program that acts as an operation interface between users and Unix systems. File
1. Create and run Shell programs
What is a shell program? Simply put, a shell program is a file containing several lines of shell or Linux commands.
Like programming in advanced languages, writing a shell program requires a text editor, such as VI.
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