What does $$,$#,$ in the "share" shell script mean?

Give you a full, you in the Linux environment to try to understand more:The execution name of this program$n the nth parameter value of this program, n=1..9$* all parameters of this program, this option can have more than 9 parameters.$# the number

Linux Modify shell command prompt and color

Zhanhailiang Date: 2014-10-181. Load the configuration file sequence during the Linux login process:/ETC/PROFILE→/ETC/PROFILE.D/*.SH→~/.BASH_PROFILE→~/.BASHRC→[/ETC/BASHRC]You can view the default ~/.BASHRC file as

Linux Shell user Input--organize

There are three main forms of processing Linux input in shell scripts:1) Treat them like command line arguments, and obtain corresponding input parameters by corresponding positional parameters2) through getopt and getopts These two commands 3)

[Introduction to Basic/linux basics of Linux]shell programming

declaring the execution program#!/bin/bashUsed to tell the system to use the/bin/bash program to execute the script. For example, a Python script can be written like this:#!/usr/bin/pythonassignments and referencesAssignment formula:Variable name =

Shell Learning & | what is the difference?

Tag: Shell Before answering the questions in this chapter, let's first understand the concept of return value!Each Command or function we run in shell will return a value of the parent itinerary at the end,Return Value.Available in shell command

How to take the characters in parentheses in Shell

1. Use grep (the result is enclosed in parentheses. I wonder if I can match the content in the brackets only) $ A = 'abc [EDG] adfirpqu '$ echo $ A | grep-O '\[. * \] '# escape [EDG] $ B = 'abc (EDG) adfirpqu' $ echo $ B | grep-O '(. *) '(EDG) 2.

Shell Automatic Logon script

#! /Bin/baship = 'awk' {print $1} '/home/bash/mima.txt' For I in $ ipdo {Port = 'grep $ I/home/bash/mima.txt | awk '{print $2} ''pawd = 'grep $ I/home/bash/mima.txt | awk' {print $3}'' CT This article from the "IT technology personal opinion" blog,

Hbase shell basics and Common commands)

Basic usage of hbase Shell Hbase provides a shell terminal for user interaction. Run the hbase shell command to enter the command interface. Run the HELP command to view the help information of the command. The usage of hbase is demonstrated using

If judgment in Shell

Tag: String null Integer comparison: -EQ equals to, for example, if ["$ A"-EQ "$ B"] -Ne is not equal to, for example, if ["$ A"-ne "$ B"] -GT is greater than, for example, if ["$ A"-GT "$ B"] -Ge is greater than or equal to, for example, if ["$

Detailed explanation of grep COMMANDS IN SHELL

Use 'grep' to search for text files If you want to find a string in several text files, you can use the 'grep' command. 'Grep' searches for the specified string in the text. For example, if you are searching for a file with the string 'Magic 'in the'

Shell numeric operation

1. Five methods for calculating the value: (I ++ )) Let I ++ I = $ (expr $ I + 1) I = $ (echo $ I + 1 | BC) I =$ (echo $ I 1 | awk '{printf $1 + $2 }')   2. The time command is used to

Shell string operation

1. The length of the string, for example: * $ Var = "Get the length of me" $ Echo $ {# var} 20 * $ Expr length "$ Var" # note that double quotation marks are used. 20 * $ Echo $ var | awk

Shell scripts calculate any number of addition, subtraction, multiplication, division

#! /Bin/basffe [$ #-EQ 0]; then Echo "the input value cannot be blank." // The system prompts that null values cannot be entered. Note: $ # indicates the number of environment variables exitfinum =* * // defines a global variable to facilitate the

Shell obtains the gateway and modifies the IP address to enable the NIC.

Shell obtains the gateway and modifies the IP address to enable the NIC. #! /Bin/bash # autho freefei # script is a init computer ETH # data 2014 10 09 192.168.1.1netstats =$ (netstat-r | grep default | cut-f 10-d ''); echo $ netstats; # change

Shell script checks the program. If it fails, restart the program.

The script is as follows: #! /Bin/sh # Name of the process to be checked progress_name = "heihu_server" # ------------------------------- # function: checkprogress # function: Check whether a process exists # parameter: $1 --- Name of the process to

Shell internal and external commands

Labels: Bash internal and external commands What is an internal command? What is an external command?Internal commands: commands provided by the shell programExternal command: executable program in a path inside the system. The search for

Shell -- read command

READ command-N (do not wrap)-P (prompt statement)-N (number of characters)-T (wait time)-S (do not echo) 1. Basic readThe read command receives input from standard input (keyboard) or input from other file descriptors (as described later ). After

Shell exercise: Analyze Nic Information

  Use shell scripts to analyze Nic status information Question: Shell programming1. Write a script to read the traffic on the NIC, the number of packets received and sent, the number of packet loss, and the packet loss rate;2. The NIC name must be

Shell BASICS (4) arithmetic operations

--- Content from http://www.jb51.net/article/31232.htm By default, values assignment and operations in shell are processed by strings,1. Example of an error methodA)Var = 1 + 1Echo $ VaRThe output result is 1 + 1. Tragedy.B)Var = 1Var = $ var +

What is the difference between $ @ and $ * in shell learning?

What is the difference between $ @ and $ * in shell learning? Before talking about $ @ and $ *, you must start with the positional parameter of shell script...We all know how variables are defined and replaced.However, we also need to know that

Total Pages: 541 1 .... 233 234 235 236 237 .... 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.