Guide
This article will cover the most common tools used by Linux to process text using the shell: Find, grep, Xargs, Sort, uniq, tr, cut, paste, WC, sed, awk, and the examples and parameters provided are the most common and practical. The
1.1 Shell some small summary1, 0 wide assertion 2, Print menu 3, getopts option Introduction 4, script query IP geolocation1.1.1 grep zero-width Assertions (0 wide assertion)It means taking out what you want and getting rid of things you don't care
Recently summed up some of the shell's operations on strings, hoping to help you better understand the shell. Strings can also be manipulated in the shell through external commands such as awk, SED, but invoking these external commands is very
Linux Common commands:(LS: List directory contents)-a/-all list all files, including hidden files-L displays details using long format, including rwx(mkdir: Create directory)-p/-parents to create a directory where the upper-level directory is not
1. The SED editor uses the SED editor, called the Stream editor, to edit the data flow based on a set of rules provided beforehand. Format: SED option script file (1) OPTION-E script when processing the input, add the command specified in the script
Objective:Shell + ansible + Gateone Automated operations Management: Minimal manual intervention, combined with the use of scripts and third-party tools to ensure that the business system 24x7 efficient and stable operation;
1. Installation
Write the play, in the Init 5 level, after running will actively generate two windows, the system and the system on the main services to monitor, and timely refresh, to share.650) this.width=650; "src="
How to use:./spark-script. sh your_file.scala first_arg second_arg third_argScript :scala_file=$1Shift 1arguments=[email protected] #set+o POSIX # To enable process substitution if not running on bash spark-shell--master Yarn--deploy-Mode
There are several ways to bash a shell script, and now make a summary. Suppose we write a good shell script with the file name hello.sh and the file location in/data/the shell directory and has execute permissions. Method One: Switch to the
The shell supports custom variables.Defining variablesWhen defining a variable, the variable name does not have a dollar sign ($), such as:Value= "TMP"Note that there can be no spaces between the variable name and the equals sign, which may be
# vi/etc/rc.d/traffic_monitor.sh----------------------------------------------#!/bin/Bashpath=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/Sbin;export PATHfunctionTraffic_monitor {# system version Os_name=$(sed-N'1p'/etc/issue) # Network
Shell tip:1. Need to add ' $ ' when referencing variables2.shell variable viewing and deletionSet | grep variable name//view Set Variable unset variable name//delete variableThe difference between single and double quotes in 3.shell650) this.width=65
PS: Red is a variable in the following code and is changed according to its own environmentGet-mailbox-organizationalunit IT | New-moverequest-targetdatabase Jjr01 -baditemlimit 10000 #以OU为单位移动邮箱 get-mailbox-database jl01 |
When you learn the shell, you create new files and then write shell scripts in the new file to learn. So there are a few steps:1. Create a new shell script using the touch command2. Writing shell scripts3, use chmod more shell script permissions,
Use the SET command to set various shell options or to list shell variables. A single option sets commonly used attributes. After some options, the-o parameter opens special properties. After some options use +The o parameter will turn off some
The line end flags for Linux and Windows text files are different. In Linux, the text file uses "/n" for carriage return, while Windows uses "/r/n" to indicate carriage return line breaks. Sometimes you need to be aware of this when writing shell
Shell1) is a scripting language used on the Linux operating system, providing interfaces for user interaction with the system, similar to the command prompt in Windows, but more powerful;2) can be executed by the command line, or it can be edited as
Bash variables are non-typed------------------------Unlike other programming languages, Bash does not differentiate between variables"type"In essence, bash variables are strings. But depending on the context, bash also allows comparison operations
Specify an array for a characterHow to display an arrayA=1echo $a1A= (1234) echo $a1echo ${a[@]} 1 2 3 4echo ${a[*]}1234Specifies the number of digits in the display arrayecho ${a[0]}1echo ${a[2]}3echo ${a[3]}4Echo ${a[4]} spacesAdd arraya[4]=9echo $
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.