Shift operations in the shell

Positional parameters can be shift shifted left with the command. For example, the shift 3 original $4 now become $1 , the original $5 now become and $2 so on, the original $1 , $2 $3 Discard, $0 do not move. Commands with no parameters are shift

Shell installation Tomcat (three)

#!/bin/bash#bu lctomcatdir=/home/tomcattomcattar= $TOMCATDIR/apache-tomcat-7.0.65.tar.gzjavadir=/usr/ javajdkdir= $JAVADIR/jdk1.8.0_65jdktar= $JDKDIR/jdk-8u65-linux-x64.tar.gz### #8080 # # # # #T8080DIR = $TOMCATDIR/ tomcat-reststart8080= $T 8080dir/

Shell Learning Notes

The shell is born in Unix and is a tool for unix/linux interaction, and it doesn't make sense to learn the shell alone.The shell needs to rely on other programs to do most of the work, which may be his flaw, but its undoubted strength is that the

Intra-enterprise network segment detects how many hosts live--shell scripts

Intra-enterprise network segment detects how many hosts are alive1) byPingLifeorder to achievePing-c 1-w 1 IP- C: indicates the numberof times , 1 is 1- W: represents deadline, time out , in seconds,1 for 1 seconds. Note: a) If one goes to ping to

Shell Small Example

Requirements: This directory is currently created if the result directory does not exist. If Socwatchoutput.csv is present, move it to the result directory Then, pass the parameter kpi_name, #!/bin/sh#Used to save CSV file#write it by

2. Shell's shell configuration file

1. Location of shell configuration files The most commonly used shells are SH and bash, which only speak sh and bash here. 1.1. SH (Bourne Shell) configuration file has two main, respectively, each user home directory

Linux Shell Common Tips (directory)

Linux Shell Common Skills (i)Http://www.cnblogs.com/stephen-liu74/archive/2011/11/10/2240461.htmlI. Special documents:/dev/null and/dev/ttyTwo. Simple command trackingThree. Regular expression basic Syntax descriptionFour. Use the Cut command to

Shell backup + to determine if the transfer is complete

#!/bin/bash#by lc#dir=/rootdir=/server/scriptsyuanfile=hins423437.tar.gzbakfile=hins423437_xtra_20.*. tar.gzlc  () {  if [  ' ls -l  $DIR |grep  "${bakfile}" |wc -l '  -eq  1 ]  then     duyuan= ' ls -l  $DIR |grep  "${YUANFILE } "|awk  ' {print $5}

Shell Common Small commands

1. Renaming1) Simpler processing command: MV original filename new file namesuch as: MV MyFile newName # # # will myFile renamed to NewName.2) Renaming files command: Rename name_old name_new fileFor example: Rename MyFile newName myfile.text # # # #

Linux Rman Shell

# make direcory for backset file and scripts file,in my Case/backup/db_bakCd/backup/db_bakmkdir Scripts Logs Rman# The following is contents of Rman_backup_shVi/backup/db_bak/scripts/rman_backup_sh#!/bin/bash# author:anbob.com# Desc:rman Backup

shell< two >

1. you want to download a software from the server, your machine has two network cards eth0 and eth1, the address is configured as follows:Eth0 : 192.168.6.25/24Eth1 : 172.16.101.25/24 default gateway: 192.168.6.1/24 server address:211.138.18.3

Linux Shell Script Raiders 001

Shell scripts are usually text files that start with #!/bin/bash. #! is placed before the interpreter path.Use bash as the interpreter to interpret all command-line commands.There are two ways to run a script, one is to use the script as a

Using Shell to bulk add users

Add users in bulk and set a random password to save the added user's name and password to a file.[Email protected] scripts]#CatUser.SH #!/bin/SH forIinch`seq-W Ten` DoPass=$(Echo "' Date ' $RANDOM"|md5sum|Cut-C1-8) //Take the random number method is

Lao Li share: "Linux shell Script Raiders" Essentials (VI)

1. Print network interface list [[email protected] touch_more]# Ifconfig | cut-c-10 | Tr-d ' | Tr-s ' \ n 'Eth0lo//cut-c-10;      Outputs the first 10 characters;//tr-d ";     Remove all spaces;//tr-s ' \ n '; Compress duplicate newline characters 2,

Lao Li share: "Linux shell Script Raiders" Essentials (i)

Chapter One: Shell Start-up basics1. Variables: In bash, the value of each variable is a string. Whenever you assign a value to a variable, there is no quotation mark, and the value is stored as a string.2, Var=value; Assignment operationvar = value;

Shell Getting Started-variables

Shell variables are divided into system variables and user-defined variablescommands to view variables#env System VariablesOr #set include env and custom variables and extra variablesThe command to use the variable is#echo $ "Variable"///////////////

Shell Programming--eof

In shell programming, "EOF" is usually used in conjunction with " Interactive Program (command) The content in the middle of "EOF" will be entered as a standard input to the "interactive program", when the shell sees

Save the shell command as a variable

The command is placed in the "(General keyboard 1 to the left of the key), such asEcho ' DMESG | grep ETH ' The command is placed in $ (), such asecho $ (DMESG | grep eth) Can be saved to the variable varname as followsVarname= ' DMESG | grep

Shell three execution modes (simple parameter description)

ShellThree ways to do it (not original, forget who's blog) 1: . Filename 1. SOURCE command usage: source FileNameFunction: Reads and executes the commands in the filename under the current bash environment. The filename file can have no "execute

Linux Shell programming [essence]

0. Internal variables in the shell:1. $?: Represents the return value of the shell command.2. $$: Represents the PID of the current shell.3. $!: The last PID value to be put into the background job.4. $ A: Indicates the name of the script.5. $1--$9,$

Total Pages: 541 1 .... 535 536 537 538 539 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.