Marco Learning notes--shell variable types

Shell Variable BasicsThe shell variable is a very "weak" variable, by default a variable holds a string, and the shell does not care what the string means. So for mathematical operations, you must use some commands such as let, declare, expr, double

Shell learning-Getting started with awk

I. AWK application ScenarioFormat data or extract records from a large text fileTwo. How to use Command line mode$awk [-F field-separator] ' commands ' input-file (s)Commands is the real awk command.The [-F domain delimiter] is optional, and if

Installing the LNMP environment with shell scripts

#/bin/bash#----------------------------------------------------------------#data =2015-03-19#auth: Tongcheng#Nginx version:1.6.2#Php: 5.4#Mysql: 5.5.0#-----------------------------------------------------------------#删除关于安装软件的包Delete ()

Three ways to execute shell scripts

1. Bash script or SH script2,./script3,. Script or source script650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/5B/6C/wKiom1UIOtqyKgSsAADRgwmwoFU423.jpg "title=" QQ picture 20150317223121.jpg "alt=" Wkiom1uiotqykgssaadrgwmwofu423.jpg

The role of the character "&" after running commands in the Linux shell

The original link is: http://blog.sina.com.cn/s/blog_963453200102uya7.html& placed after the startup parameter to set this process as a background processBy default, the process is the foreground process, then the shell is occupied, we can not do

Three. Shell Basics 2

I. User and user group management . Root User: The system is unique, is real, can log on the system, can be operating system any file and command, with the highest authority; 2.Virtual User: Distinguished from real users, such users do not have the

5 TR of the shell command

This is a magical command.TR's whole spell is translate, that is, translation. The interesting thing is that we can make rules for translation. Use the following:TR [option] set1 [Set2]TR accepts input from the standard input and prints the result

Consistency issues with the Shell's trap

Example 1:[Email protected] example]$ more trapping#!/bin/sh# scriptname:trapping# Script to illustrate the trap command and SignalsTrap ' echo ' ctrl-c would not terminate $. "' 2Trap ' echo ' ctrl-\ would not terminate $. "' 3echo "Enter any

bash Shell shortcut keys

TRL key combinationCTRL + A: The cursor moves to the beginning of the line.CTRL+B: The cursor moves left one letterCTRL + C: kills the current process.Ctrl+d: Exits the current Shell.Ctrl+e: The cursor moves to the end of the line.Ctrl+h: Deletes

The Linux shell gets millisecond-level timestamps

There is no millisecond unit of time in a Linux shell, and only seconds and nanoseconds are actually sufficient, since the unit range of nanoseconds is (000000000). 999999999), so the nanosecond is also available from nanoseconds to

CreateLiveCMSV4.0 vulnerability, no background get shell required

title:createlivecmsv4.0 vulnerability, no background get shell--2012-03-06 17:28Title: createlive CMS Version 4.0.1006 Vulnerability without background Get shellRequired environment: IIS6, upload directory executable scriptCreatelive CMS Version 4.0.

Shell Script Example

Shell Basics: http://bbs.chinaunix.net/forum.php?mod=viewthread&tid=452942First, cycle 1-100, and calculate the 1+2+3+4+5+6+7+8+9+10 and#!/bin/bashSum=0For ((i=1;iDoWhile [$i-le 10]Dosum=$ (($sum + $i))BreakDoneDoneEcho $sum#me: Notice the time1.sum=

Shell cannot execute post-su script

Issue: After executing the "su– username" in the shell script, the script terminates execution and switches to the interactive interface behavior of the specified user name in su: I execute a script in root, but some of these commands or scripts

Access, deletion, substitution and substitution of "Shell" variables

--from "Brother Bird's Linux private dish"--summarize and make it convenient for inspectionaccess to variables : EchoEcho $variableEcho $PATHEcho ${path}Configuration rules for variables1. Variables and variable contents are linked by an equal sign "

Shell Scripting Learning

To see what versions of the Shell:cat/etc/shells system are currently running, the first process that starts is initHow bash Shell debugs:Simply add parameters after the SH command-N: Do not execute scripts, query the grammar within the scripts, if

Querying the shell script for IP attribution

#!/bin/bashipp () {exec  '  | awk -F  ' [<>]+ '   ' {print substr ($5,7)} ' echo  $aecho  -e  "\033[44;37;5m  $string 1 \033[0m" done}case $1 in-f) Shiftipp  $1;; -i) shiftstring1= ' curl -s  "http://www.ip138.com/ips138.asp?ip=${1}&action=2"

Linux Shell basic3 dd WC comm chmod ls

Generating files of any size/dev/zerois A character special device, which infinitely returns the zero byte.The above command would create a file called Junk.datathat is exactly 1MB in size. Let ' s goThrough the Parameters:ifstands for–inputfile,

Shell programming variables and variable types

Programming languages: Including machine language, assembly language, {high-level language [static language (compiled language, generally strongly typed variable, need to be published as executable, C, C + +, java,c#) and dynamic language

Shell script variable definition be careful not to duplicate the name of the system variable ...

Writing a very simple script, the results are very strange.1 #!/bin/bash 2 3 path= $HOME/vlc_transplant4 4 5rm -F $PATH/ VLC6Ln -S $PATH/bin/vlc-static $PATH /vlcExecution Result:[Email protected]:~/vlc_transplant4$./update. SH . /update. SH 5

Test and content replacement of shell variables, replacement of shell Variables

Test and content replacement of shell variables, replacement of shell Variables Reference: laruence's private house dish-Linux BASICS (Third edition). In Chapter 11th of the Linux BASICS (Third edition, the final example illustrates '-', '=', and '

Total Pages: 541 1 .... 328 329 330 331 332 .... 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.