I. Special symbols in the shellNumber: wildcard character, can match 0 or any number of characters? Number: Tan,#号: An annotation character that is followed by a command or parameter that does not execute\ No.: Raise the meaning of the instruction
Tput commandtputYou can change terminal features, such as moving or changing the cursor, changing text properties, clearing specific areas of the terminal screen, and so on.Cursor PropertiesIn a shell script or command line, you can change the
Note: If you are the factory of children's shoes, write homework to find this article, I hope you do not copy ^_^, in fact, try to knock on your own will help you a lot.The title requirement is to student.txt the results of each stage of the
1.shell (Bourne Agin Shell) is a command parser that provides interaction between the user and the machine, as well as zsh, Ksh2. Where are the orders that we have knocked on? In the. bash_history file in your home directory, you can save up to 1000
number of logged-in users: who | Wc-l
See which users are logged on to the system : who
Create a new file /bin/ct11, enter a command in the file,chmod Set the Execute permission for the file
# cat >/bin/ct11W.H.O. | Wc-lPress Ctrl+d# Cd/
1. Judge whether the number entered by the user is a positive integer.#!/bin/bash#判断用户输入的参数是否为正整数Read-p "Please input a digit:" intif [["$int" =~ (^[0-9]*[1-9][0-9]*$)]];thenecho "This digit is positive integer"Elseecho "This digit was not positive
A Linux shell script Shell: command-line interpreter(1) SH(2) CSH(3) Ksh(4) Bash Shell script: A collection of commands that accomplish a specific thing Two run a shell script file 1. Add executable permissions, and then run the./shell script file2.
Enterprise Practice Question 16:Enterprise Case: Write Network Service standalone process mode rsync system startup scriptFor example:/etc/init.d/rsyncd{start|stop|restart}.Requirements:1. To use the System function library technique.2. To use a
Command line and Shell: the command line refers to the interface that provides user input, which itself simply accepts input and then passes the command to the command interpreter, which is the shell.Note: The command line and file for Linux are
I wrote a shell script today, hoping to simplify the problem of login proxy server, but when script was written, it found that the environment variables were not obtained as expected.In order to make everyone understand, post the script content for
Shell Synthesis Example (i)To back up the system configuration file:1, scheduled task service configuration file/var/spool/cron/root2. Boot from boot profile/etc/rc.local3, the Daily script directory4, Firewall iptables configuration
Shell Concept :The shell is a command-line interpreter that provides users with an interface system-level program that sends a request to the Linux kernel to run the program, and the user can start with the shell, suspend, stop, or even write some
The bash and shell relationships of LinuxShell Popular Understanding: Translate user-entered commands to the operating system.The shell is an interactive command interpreter. The shell is independent of the operating system, which gives the user the
In operation and maintenance work, we should analyze the log of back-Office system frequently, and provide the basic data for the monitoring result by grasping the key word information in the log and counting the fetch results.The following shell
If condition test Type: File test, digital test, string testIf statement structure:
If ...; Then ...; Fi
If ...; Then ...; else ...; Fi
Conditional test expression:
[Expression]
Https://www.shellscript.sh/variables1.htmlA variable is the name of a block of memory that can be manipulated (read, write).1, return to the tradition. -"The only way to learn a new programming language is to use it to program"try -1Create a
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