Shift parameter moves left oneSHIFT + number, the parameter moves to the left n bits at a timeIt can be used to determine the number of parameters behind the program.Returns an error when the shift value is emptyUse read to assign input values to
#!/bin/sh# defines a function that checks the operating system version num_version=$ (UNAME-R) function check_os () {[[ $NUM _version =~ el6 ]] && return 0| | return 1}echo "##### #CPU使用情况 ######" cpu_hardware=$ (cat /proc/cpuinfo | grep name
Environment:Kali system, Windows systemProcess:In the Kali system generated by the use of files, Kali system listening to the local port, Windows system open DOC file, you can recruit The first method of use, suitable for testing:Download code from
Shell script:A text file that contains some commands or declarations and conforms to a certain formatFormat requirements: First line shebang mechanism#!/bin/bash#!/usr/bin/python#!/usr/bin/perlThe purpose of the shell script is:? Automation common
First, Shell introduction------------User|Terminal (equivalent to Bash's interface)|Shell (shell) bash most Linux systems default shell environment|KernelThe user enters the command through the terminal, submits it to the shell, and then invokes the
#!/bin/bash# Create a link interface named Bond0 ip=$1gate=192.168.18.1eth1=eno1eth2=eno2#eth3=eno3#eth4=eno4modprobe bonding# Back up the NIC 1 file cp /etc/sysconfig/network-scripts/ifcfg-$ETH 1 ifcfg-$ETH 1.bak# Modify the NIC Profile
For example, the need to test a batch of IP in the work is still blocked, you need to write a simple script ping test.We need two machines,Virtual Host: centos6.7 systemLocal linux:centos6.5"Virtual Host"Remote to the host, add IP (Learn the script,
Two virtual machines, all to be detected1. is yum available2. Firewall default zone modified to trusted3. Whether the IP address is configured#######################################################Second, ordinary users (must restore the environment)
Equipped with the Spark cluster, first wrote two small examples with Pyspark, but found that the TAB key is not prompted, so the intention to go to Scala to try, in the Spark-shell under the hint, but found not to backspace, and the hint is not a
What is a shell?The shell has some common command set, which is an instruction for invoking the inner core of the system. Here's a list of some common shell commandsls: View all files in the directory-L : View file Details-A: View all files,
Shell Common Command Summary1 ls command: List filesLs-la list all files and folders in the current directoryLS A * lists all files starting with the A letter in the current directoryLs-l *.txt lists all files with the suffix txt in the current
#1, replaceReplace 2017 in #将1. txt file with 2016 display on screenSed "s/2017/2016/g" 1.txtReplace 2017 in #将1. txt file with 2016 display to completely modify the file on the screen, plus I modify the fileSed-i "S/2017/2016/g" 1.txt#Sed读取系统变量,
Understanding shell ScriptsThe shell script works in two ways:Interactive: Enter a command that the shell interprets and executes a commandBatch: Write many commands to the shell script, and the shell executes all commands at onceShell a script is a
IntroductionWorking on the Linux platform, we often need to use the shell to write some useful and meaningful scripting programs. Sometimes, the shell array is used frequently. So, how does the array in the shell behave, and how is it defined? The
Often encountered in the file has a duplicate record of the scene, either remove duplicate records, or count the number of duplicate records, these simple functions can be implemented through the Sort,uniq combination of shell commands,For example,
1. Questions on the face of the awk command(1) Recently logged in 5 accountsLast-n 5 | Awk-f ': ' (specify domain split symbol) ' {print $} '-N indicates number and how many rows need to be displayed. Reads a record with a ' \ n ' newline, then
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