Shell parameter Introduction

$0 = Shell Name or shell script name $1 = first shell parameter ... $9 = ninth shell parameter $ # = Number of location parameters "$ *" = "$1 $2 $3 $4 .. $ N" "$ @" = "$1" "$2" "$3" "$4"... "$ N" $? = Exit status of the recently executed command $ =

Erlang shell debug debugging

Reprinted: http://langzhe.iteye.com/blog/671762     Prerequisites: the Erl file must be compiled using the debug_info option. Otherwise, the invalid beam file or no abstract code will appear:Error Compilation Method: Make: All ([debug_info]). |C

Shell tips for using wget commands

Wget is a command line download tool. Linux users are using it almost every day. The following describes some useful wget tips to help you use wget more efficiently and flexibly. $ Wget-r-NP-nd http://example.com/packages/ This command

Shell script learning-8 (SED command learning)

Example 10What is the execution sequence of many-e commands? [Rocrocket @ rocrocket programming] $ cat mysed.txtBeijing 2003Beijing 2004Beijing 2005Beijing 2006 Beijing 2007Beijing 2008[Rocrocket @ rocrocket programming] $ sed-E's/Beijing/London/G'

Take Shell notes ---- private dish of laruence

VI editing tool usage: Common commands: H, J, K, L correspond to the left, bottom, top, right CTRL + F flip forward CTRL + B flip back 0: Move to the first character of this line G moves to the last row of the file. N [enter] move the cursor down n

Shell note01: some shell combinations

Some shell combinations CTRL + L: Clear the screen CTRL + W: delete the word starting at cursorCTRL + u: Clear the line I. e. Delete the all words from Command LineTab: auto-complete files, directory, command names and much moreCTRL + R: search

The longest shell command written by myself (haha)

Rm result.txt; grep "act = dataafter000000000482" raw_data_201%25.log | grep-V "; OK" | grep-V "404 \. H "| awk-F"; "'{split ($3, myarray ,","); print myarray [1] "#" myarray [2] "#" myarray [3] "#" $0 ;} '| awk-F "#"' {If ($1> = 5) | ($2> = 5)

Shell condition judgment Summary

-B file: if the file exists and is a special block file, it is true.-C file: if the file exists and is a special character file, it is true.-D file: if the file exists and is a directory, it is true.-E file: true if the file exists-F file: if the

Shell script debugging

The shell script was called for half an afternoon .. Shell is really a Nb tool .. Thanks for a space. If you do not enter one space, the space can be adjusted to death .. 1. There are some very strange errors. The error location during execution is

Shell beginners-several simple shell scripts

Example 1#! /Bin/shcase ${1 # *. Tar.} In bz2) tar jxvf $1; GZ) tar zxvf $1; *) echo "Wrong file type" esac$1 indicates the first command line parameter ${1 # *. Tar.} when running the script. It indicates that the first command line parameter is

Mathematical calculation of variables in Linux shell scripts

Let's start with an example: x=1+1echo $x Are you expecting output 2? Let you down. The output result is 1 + 1. Why? This is because the variable type in shell script is "string" by default, so if the variable type is not specified, 1 + 1 is a

Shell programming/[win/Linux] Other related records

1. Get the return value of Command Execution ? 2. Get the return value of Script Execution #!/bin/bashecho "A test."exit 0 Echo $ ?, Output: 0 3. Execute programs in the background in Linux In Windows, use the start command and specify the/B

Shell scripts syntax

Shell scripts are similar to the C language and also have a fixed language format. in short, shell scripts are like batch processing files (. BAT), the most basic function is to write a lot of commands together, so that users can easily execute a

[Shell script learning] script task 7.18-7.21

Write a script:1. Create a directory/tmp/scripts2. Switch the working directory to this directory.3. Copy the/etc/PAM. d directory to the current directory and run the test command again.4. Change the owner of test and its files and subdirectories

A self-written shell script for automatic formatting, mounting upon startup, creating users and managing ACL Permissions

  At noon yesterday, after finishing learning ACL and mounting, I tried to write a small script. Suppose a group develops a project and needs to create a project group with three users and a shared folder, to prevent mutual modification or even

Shell script programming: Linux automated logical volume creation script

Write a script to create and manage LV:Note: During script execution, a menu is displayed to the user, as shown in the following figure:A create an LV.B create an LV in an existing VG.C extend an LV.D reduce an LV. If you select item A, the

Shell script learning-7 (SED command learning)

Example 5 insert some content after some strings [Rocrocket @ rocrocket programming] $ cat mysed.txtBeijingLondon [rocrocket @ rocrocket programming] $ SED's/B. */& 2008/'mysed.txtBeijing2008London The purpose of this command is to add the following

Shell script learning-9 (LN command learning)

[Starting text] Ln is a magic command. It can create a file shadow or enter another place through one channel. :) In fact, all these tricks are implemented through soft connections and hard connections. Let us assume that you have read the article

Shell script learning: sed for regular expressions, tr

In Linux, The SED command is used to replace the text. The command that matches the regular expression can be replaced flexibly with SED, which greatly reduces the workload. It can be said that SED is the main force of replacement in shell scripts

Shell script learning: quick understanding of Regular Expressions in grep

Shell scripts are the core of Linux, while regular expressions are the core of shell scripts. Understanding regular expressions can quickly match the content to be searched, lay a solid foundation for future shell script programming.   The contact

Total Pages: 541 1 .... 417 418 419 420 421 .... 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.