A detailed explanation of the parameters in the shell in Linux

The method of parameter passing in shell script is commonly used in 8 kinds 1. $# the number of parameters passed to the script 2. $* displays all parameter variables passed to the script in a single string. Unlike positional variables, this

Linux shell Programming Shortcuts Daquan (daily collation) _linux Shell

Sometimes we need to repeat the previous commands in Bash. You can, of course, use the UP ARROW keys to view the commands you've run before. But there are some better ways, for example, to master the following shortcuts. 1)!! : Repeat the previous

Bash Shell Script Learning Summary _linux Shell

1. Character truncation:If the character truncation is a generic path, you can use both the basename and dirname tools:BaseName can truncate a filename from a file path For example: Copy Code code as follows: $

Shell time (date) related commands _linux shell

Date +%f date-d last-day +%y-%m-%d date-d yesterday +%y-%m-%d date-d next-day +%y-%m-%d date-d Tomorro W +%y-%m-%d date-d ' 2 days ago ' +%y-%m-%d date-d ' 2 weeks ago ' +%y-%m-%d date-d ' 2 months ago ' +%y-%m-%d date-d ' 2 years ago '

Shell lookup Symbolic link and its approach to target introduction _linux shell

In Unix-like systems, symbolic links are common and we encounter a variety of processing work related to symbolic links.This article for you to introduce some of the practice of symbolic links, I hope to write a shell script to bring some help, the

Turn: Several cases of sqlplus and shell passing value to each other

Several cases of sqlplus and shell passing value to each otherScenario One: The simplest invocation of sqlplus in the shell$cat test.sh#!/bin/shSqlplus Oracle/[email Protected]>file.log SELECT * from Test;ExitEOF #注意EOF要顶格写$sh test.sh$cat

Shell Script Debugging methods

We started the Shell Script debugging series, first explaining the different debugging options, and here's how to enable Shell debug mode.After you finish writing the script, it is recommended that you check the syntax in the script before running

Linux shell Scripting--building basic scripts (i)

Create a shell scriptWhen you create a shell script file, you must specify the shell to use in the first line of the file, in the format:#!/bin/bashCreate and execute SH scriptCode 1-1[Email protected]:/data# cat demo1 #/bin/bashdatewho[email

Linux Learning Diary-using Shell variables

Shell variables are used to store the specific parameters (values) that the system and the user need to use, and these parameters can vary according to the user's settings or changes in the system environment."The role of variables"Provides specific

Use Shell to delete files from three days ago or three days in Linux

Description: +n is greater than N,-n is less than n, n is equal to N.Find/-amin-30-ls # finds files accessed in the last 30 minutes of the systemFind/-atime-2-ls # finds files accessed in the last 48 hours of the systemFind/-mmin-10-ls # finds files

Shell Note 9

File type: Normal file, directory file, socket file, device file, link file determines whether a file is a symbolic link file. Yes, move it to the/etc directory; No, do not handle it . 1 #!   /bin/bash 2 #filename: a.sh 3 filename= 4 echo "Input

About shell Script BASIC programming article Fourth

Shell Script BASIC Programming fourth articleMain contents of this chapter: functionsFunctionfunctionfunction name {command;} or name () {command;}Defines the Shell function.Create a shell function that is named name. When enabled as a simple

Summary of Shell,awk,sed interception string method in Linux

ShellThe first type:${parameter%word} minimal truncation of word from behind${parameter%%word} to maximize the truncation of word from the back${parameter#word} minimal truncation of word from the front${parameter# #word} to maximize the truncation

Shell script Programming "on"

Shell script Programming "on"A program is a combination of instructions and data.Program Programming Style:Program: command-centric, data-serving instructionImage: Data-centric, command-serving dataProgramming Languages:Low Level:

hexadecimal numeric representation in the HBase shell

When you use the HBase shell for a Get or scan operation, you will occasionally see some values being converted into 16, just like the followingvalue=w\x5c5\x80So what exactly does this value equal? The algorithm is found after reviewing the data as

[Shell instance]--a script implementation to batch copy files to multiple servers (Nmap, SCP)

Practice Environment:(1) All servers will shut down firewalls and SELinux(2) The root password for all servers is set to AIXOCM(3) All servers are 10.0.100.* network segments and are guaranteed to communicate with other hosts(4) All servers ensure

Eval in a shell script

The role of Eval is to perform command-line processing again, that is, to perform two command-line processing on a single command line.1. Example 1: Using the eval technique to implement the shell's control structure forUse the Eval technique to

Shell acquisition Time related commands

Linux Shell gets time and time interval (MS level)Note: While performing some performance testing, sometimes we want to calculate the time a program runs, and sometimes it is possible to write a shell script to facilitate some performance test

Explanation of the meaning of shell variable $#,$@,$0,$1,$2 in "Shell" Linux && set keyword usage

abs

Excerpt from: Abs_guide: http://www.tldp.org/LDP/abs/abs-guide.pdf The meaning of shell variable $#,[email protected],$0,$1,$2 in Linux is explained:Variable Description:$$The PID of the shell itself (ProcessID)$!PID of the Shell's

Write a bash shell script

Write a bash shell scriptThe script is as follows: it is used to monitor the number of mongo connections and restart the system.#! /Bin/bash# Source/etc/profileConn = '/usr/bin/mongo -- quiet Db. serverStatus (). connectionsExitEOF`Conn1 =$ {conn #*:

Total Pages: 541 1 .... 92 93 94 95 96 .... 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.