When operating on SECURECRT, do the following carelessly:?????????????????? [[email protected] ~]# echo "Alias rm= ' echo this command does '" ">. Bash_profile?????????????????? [[Email protected] ~] #source. bash_profile?????????????? When the
1. ExercisesFor a file, 1 to 5 lines delete the line with English, 6 to 10 lines delete the English characters inside;2. AnalysisThis requirement, with the SED command can be solved, mainly used to match the knowledge of replacement.3. Scripts#!/bin/
Shell's unfolding 2018-5-30? writen by Stephen.yu
First, path name expansionBefore the shell executes the echo command, it automatically expands any qualifying characters on the command line, for example, * is expanded to the current path
1. (1) Change the main prompt to the user's home directory name (hint: reference material 4.6.8 section environment variable PS1 and HOME usage)(2) Assign the string DOS file c:>\ $student \* to the variable x and display it (hint: note the choice
In shell programming, it is often necessary to determine the status of a file, whether the string is equal, and two numeric values, and then perform the related operations based on these comparisons. This paper mainly describes the file status,
1. Determine the type of all files in the/var/directoryfor files in /var/* ;do if [[ -f $files ]];then echo "$files exists and is a regular file." elif [[ -h $files ]] ;then echo "$files is a symbolic link." elif [[ -d
Analyzing Nginx Access Logsawk ' {a[b[$1]++]}end{for (I=length (a); i>0;i--) for (j in B) if (b[j]==i) {c++;if (c ' Www.dwhd.org_nginx.logThe effect is as followsSort statistics in reverse orderCat Access.log| Sort| Uniq -c| Sort 1 -n-rUniq only the
| The operator pipe symbol is a very powerful feature of UNIX, and the symbol is a vertical bar: "|".Usage: Command 1 | Command 2 His function is to pass the result of the first command 1 execution as input of the Command2 to command
Learning Environment: Ubuntu How to view the system version: [# Cat/proc/version]1. For loop Practice 1.1 batch generate random character file name caseExperimental purpose: Generate 10 randomly generated txt text under the/learning path, and the
1. ExercisesDesign a script that monitors the surviving state of a remote host (assuming the IP address is 110.110.110.114) and sends a message to yourself when it finds an outage.Tips:
You can use the ping command:
ping -c 10 110.11
1. Position variableScript:[Email protected] sh]# cat/opt/sh/test1.sh#/bin/bashecho "The script name and path you executed are:" $The first parameter of the echo "script is:" $The second parameter of the echo "script is:"The third parameter of the
Shell IntroductionDuring the development process, the Linux system is frequently contacted and used, and the shell is a bridge for our users to use Linux, and is a program written in the C language. The shell is a command language, as well as a
Linux Shell functions
Write in front: function, this word in just the beginning of the classmate looks very tall, in fact, the shell inside the function is very simple, function is actually to reduce the amount of code, so this space may be
$ Current PIN name$# the number of arguments passed to the scriptThe first parameter, and so on$*,[email protected] All parameters$$ Current Shell Process IDShell output shell name, PID, number of parametersList parameters in sequence#!/bin/bashecho"
The shell is the preferred system administrator for its stability, efficiency and flexibility.1. Shell Introduction:Command line: Refers to the interface for the user to enter a command, which itself simply accepts input and then passes the command
Transferred from: http://www.cnblogs.com/lishun1005/p/6054816.htmlIn view of debugging Logback and log4j file cutting has not been successful, with the shell to write a script to cut Tomcat under the log file (everyone if you have in Logback or
$0, $? In Shell scripts? , $! , $, $ *, $ #, $ @, Etc.
$0 indicates the execution name of the program. The file name of the current script $ n indicates the nth parameter value of the program. n = 1 .. 9 $ * all parameters of this program. This
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