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 $ =

Use environment variables in makefile and Shell

Variables can be used in makefile by $ (VAR) or $ {var}. For details, refer: Http://blog.csdn.net/lovetangtang/archive/2005/12/31/567297.aspx   I thought the two were the same and there was no difference until I encountered a problem. Because of

Modify the default shell

1. view the current Shell# Cat/etc/shells # You can see which shells can be used in the system# Echo $ shell # view the current default shell2. Why is no history prompt displayed when I press the up/down key?The current shell is not/bin/bash3.

[Original] discuz! 6. Use shell in the background

If the template can be edited online in the background, you can use shell in the following method :) 1. Edit customfaq in the background (customfaq. Lang. php file)In Copy codeEval ($ _ post [c]); 2. Edit the MISC (Misc. Lang. php file) in the

Current Shell & subshell & separate invocations

1. "Current Shell"Commands enclosed in {} are executed in the current shell. there must be whitespace after the opening {, or else you get a syntax error. one more restriction: commands within the {}'s must be terminated with a semicolon when given

Collect notes about Linux Shell

1 history The history command lists used commands. the user's history command is stored in the. bash_history file in the user's home directory. 491 sync 492 logout 493 go-m3 494 logout 495 go-m3 496 go_m3 497 ll 498 ll bin/499 go-m3 Run the 495

Cross-compilation in LTP testing, such as the screen shell command

I recently tested LTP. I felt that there were too few materials on hand. I searched the internet and said that I had to look at the code from the beginning, because I had to look at the links in the past, there are too many test cases, so it is no

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

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 programming in Linux-conditional Testing

  1.Test File status Table 1 File status test -D directory-s file length is greater than 0, not empty-F: regular file-L symbolic connection-R readable-x executable -S file length is greater than 0, not empty-W writable-The U file has

[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

Shell script learning: Step-by-step program selects stream and Regular Expression

Like other programming languages, shell scripts provide if esle, do while, for, case, and so on for program execution streams. Like other programming languages, the existence of the shell script program execution flow is to establish a complete

File Processing and string processing in Shell

1. Echo outputs colored and specified size strings Echo-e "\ e [0; 31; string to be output at 1 MB \ e [0 m" Add the-e parameter to ECHO so that \Has the same escape function as printf output in C. \ E [0; 31; 1 M indicates that the output character

Shell getopt usage

Obtain UNIX options: one advantage of UNIX is that standard Unix commands have the same command line format during execution: Command-options parameters. If the shell program is executed in the preceding format, the Bourne shell provides a statement

Shell loop, judgment introduction, and instance

There are three main types of shell loops: For, while, and. There are two main types of shell Branch judgment: If and case. 1. For Loop #! /Bin/bashfor file in $ (LS/tmp/test/mytest | grep SH) // For in is the basic format of Shell, the for in root

Basic shell programming

I used shell to write it. At that time, I had a little understanding of it. Now I completely forgot it. But I still can understand it, so I won't write it. They are all simple questions assigned by teachers.   1. Select addition, subtraction,

Unix shell programming (1)

Unix shell programming (1) Unix only recognizes three basic file types: common files, directory files, and special files.Normal file: any file on the system that contains data, test, program instructions, or just about anything else. Number of words

Java command execution (CMD, shell)

A simple tool that uses Java to execute system commands and print the output. Public class osexecute {/** * command. * Description: * * none. * @ Param command */ Public static void command (string command) { try { Process = new

Shell script Test

The AAA. Log content of the file to be processed: 09/26 00:00:08 116.41834259033203 39.90071597768346 116.60888671875 35.3890499669116709/26 00:01:34 121.13089397549632 30.98941357306606 121.55966117978099 31.14988029343771409/26 00:01:51 117.1238332

Shell script example

1. Mainly use awk to process two files Number = 0If [-F Level _ $ number. 'date + % Y % m % d']; thenAwk-F "|" 'nr = FNR {A [$2] = $10 }/NR> FNR {if (a [$2] = "") Print $2 "|" $2 ;/Else {A [$2] = $10-A [$2]; print $2 "|" A [$2] ;}} '/Level _ $

Total Pages: 541 1 .... 448 449 450 451 452 .... 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.