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
Windows 7 introduces a new concept of a library, a new entry point for user data. Users can easily find and manage their data in the form of collection data, and this data may be in several different locations on the computer. This library replaces
In general, a Java background application, in the Linux terminal can start multiple, which causes waste of resources, and even the mutual operation of competing resources cause problems. The application is also launched using shell script, and there
In the Linux shell environment, there is an OD command that allows files to be exported in different ASCII code, which completes the task of converting Chinese characters to URL encoding under the Linux shell.
The URL encoding is a hexadecimal-like%
This article mainly introduces the shell script implementation to monitor the running state of the specified process, this article directly gives the script code, the need for friends can refer to the following
In the previous blog, once wrote the
&&Command 1 && Command 2: If this command executes successfully && then execute this command.[Development]/usr/xxxx/ytcclb>ls-l Test.sql-rwxr--r--1 xxxx Group Nov 14:12 Test.sql[Development]/USR/XXXX/YTCCLB>CP Test.sql Test.bak && echo "Coping file
This article mainly introduces the "shell judge string is a number", mainly related to the shell to determine whether the string is a number of content, for the shell to determine whether the number of figures interested students can refer to.
?
Installation and Configuration
Linux and OS X basically can be installed through the source to download the source code compiled, not difficult.
This is what Ubuntu says:
The code is as follows:
sudo apt-get install fish
Get into fish from bash
The case name in the shell under Linux is similar to the switch in C + +, but the cases in the shell are more powerful and complex.
1, strong mainly reflected in: Shell in case the keyword can be a string type, and each item can contain regular
command options files Some variables related to the arguments passed to the shell: the number of $# command line arguments $? The return value of the calling command $$ the process number of the current process $! The process number of the last
What is a shell?
The Shell is an interface between the operating system and the user that interprets the commands the user emits, launches the application, and manages the user data with system features. The shell can run multiple processes
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/
One. If structure
1. Single branch structure
If condition
then
statement1
statement2
...
Fi
2. Dual-Branch structure
If condition
then
statement1
statement2
...
else
statement3
statement4
fi
3. Multi-branch
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.
Environment:
SSH server:192.168.100.29 server.example.com
SSH client:192.168.100.30 client.example.com
Create secret key authentication through root user to implement Shell script management, distribution, deployment
First, the client side
The size of the log is very large, the server is generally Linux, HP, AIX, and so on, every time the download back to the trouble of the deadly, in the open source China to see the following content, very practical.
1. Use the Find and Xargs
The while loop is used to continuously execute a series of commands and to read data from the input file; the command is usually a test condition. The format is:While Commanddo Statement (s) to being executed if command is TruedoneThe command
We can pass parameters to the script when we execute the Shell script. The format for getting parameters within a script is: $n. (n represents a number, 0 is the name of the shell script executed, 1 is the first argument to execute the script, 2 is
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
Practice one: Write a script1. Set the value of the variable file to/etc/passwd2. Say hello to each user in/etc/passwd and say what the ID isShape: (Hint: line= ' wc-l/etc/passwd | Cut-d ""-f1 ")Hello,root,your UID is 0.3. Count the number of
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.