1. Understanding Shell
As long as the interface that can manipulate the application can be called Shell. The shell is also an application that works in user mode and runs as a process. The shell process is primarily used to provide a command-line
In this section, we start with some preliminary explorations of SWT from the Hello, world! program listed earlier. The so-called initial point is that we will introduce the basic ideas for the preparation of SWT programs, as well as the two
Final effect Diagram
A new 10*10 cm in Photoshop, with a resolution of 300dpi and a white canvas with a background color.
Second, create a new layer, use the rectangular marquee tool to pull out the 0.25*10 vertical bar selection, fill color R (2
Each open file is assigned a file descriptor. stdin (keyboard), stdout (screen), and stderr (Error message output to screen) are the file descriptors 0, 1, and 2 respectively. The descriptor 3 to 9 is retained for the extra files that are being
ECHO is an internal instruction of the shell to print out the specified string on the screen. Command format:
Copy Code code as follows:
Echo Arg
You can use echo to achieve more complex output format control.
Show escape
With the need to monitor some of the Apache servers that require high availability, in addition to professional monitoring and alerting devices, it is a good idea to write a script that automatically monitors Apache status on the Apache server at
Sometimes in the Linux operating system to calculate the length of a string, through the query data to the current shell to get the length of the string of various methods to share here, the method is as follows:
Method 1: Use the wc-l commandWc-l
You must have seen the effect of flying words on a Web page, but how do you implement the Echo string in a Linux system, especially in Bash command line mode, with flying effects? This effect is not practical, but occasionally to amuse themselves
When writing a shell script, we need to use a variety of special symbols, through these special symbols can make us write code more concise and efficient, here to the summary:
1, {} curly braces:Usage One: Wildcard extensionEg:ls
Today only found that the original position variable can also play so cool!!
This is a file directory backup using the location variable:
#!/bin/bash
Date= ' Date +%f '//date output from year to month
Tar Czf $ $DATE. tar.gz $ >/dev/null 2>>/opt/
In the shell script to do a variety of tests frequently, test the format of the statement:
(1) Test
(2) [
(3) [[
Three kinds of differences, in the third can be a wildcard matching, and &&,| |,, the operator can also be normal presence in [[]],
Peanut shell is a completely free desktop domain name management and dynamic Domain name resolution (DDNS) and other functions as one of the client software name. Peanut shell client to provide users with a full range of desktop domain name
Tcshshell enables users to configure their own shells with shell configuration variables and features. You can also set the characteristics by using the SET command. TCSH also has registration, and when and when to enter Tcshshell configuration file.
Like other languages, the Shell can also contain external scripts that merge the contents of the external script into the current script.The Shell contains scripts that can be used:
. FileName
Or
SOURCE filename
The
The shell supports custom variables.Defining variablesWhen defining a variable, the variable name does not have a dollar sign ($), such as:
VariableName="value"
Note that there can be no spaces between the variable name and the equals
New ordinary users in Linux are generally not assigned to root permissions, and each time su root is too cumbersome, you can add the current user in the/etc/sudoers file, the current user to give the use of the sudo command.# Switch to root user
1. The kernel is placed in the computer's memory from post, until the computer shuts down, the application is placed on the computer's hard disk, and only calls into memory execution when needed.2.shell is the application, which is the bridge
What is a shell, what can you do?1. ProceduresNarrow: Operating system programs and applications.The operating system program is used to invoke the monitoring kernel, which runs all the programs we can apply on this operating system.The operation of
CentOS 61-Key System optimized Shell scriptThe contents of the script are as follows:#!/bin/bash#author Suzezhi#this script is only for CentOS 6#check the OSPlatform= ' Uname-i 'if [$platform! = "x86_64"];thenecho "This script was only for 64bit
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