1,Echo $?: An exit status is returned when any command is running, and the exit status of the previous command is output,0Indicates that the exit is successful.
2, Test File status:[-W text]Test whether the file can be written,Echo $?The output is0
Shell script:#! /Bin/Bash must pass the first line #! To specify the Current Shell
I. variables:"": Allows you to reference values of other variables using the $ symbol.'': Other variables cannot be referenced. $ is considered as a normal
/* Is also the online answer. I don't know where to find it ......*/
In the Linux Shell environment, input and output redirection is supported, expressed by symbols . 0, 1, and 2 indicate the standard input, standard output, and standard error
1. display the 10 processes that consume the most memory/CPU
ps aux | sort -nk +4 | tailps aux | sort -nk +3 | tail
2. view the number of concurrent Apache requests and their TCP connection status
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S)
I. RequirementsWhenever you create, delete, or rename a folder/file in the Explorer window, or insert and remove a mobile storage, Windows can always update all its views very quickly. Sometimes our program also needs this feature so that our
Often, a software IOS jailbreak package requires many channels. I used to modify the channel number once and re-package it. However, as more and more channel numbers become daunting, you can only find one automatic packaging statement. You can
I. Basics
We define a variable (there cannot be spaces on both sides of the equal sign)
Filepath =/var/home/SSSFilefilename = test001
When referencing this variable, we can directly use the variable name following $.
For example, $ filepathYou can
Transferred from: t00lsExp, a vulnerability circulating on the internet, indicates that the backend can be used only if the plus directory exists and the server can be connected externally._ 1 U-T (B-F8 CPrerequisites: You must prepare your own Dede
Observe the Oracle database performance. The AWR feature provided by Oracle provides us with a nearly perfect solution. With AWR features, we can extract AWR reports from the database at any time. However, we need to provide some interactive
Go to: http://goward.jimdo.com/2010/06/15/linux-shell%E5%90%84%E7%A7%8D%E5%BC%95%E5%8F%B7%E7%9A%84%E7%94%A8%E6%B3%95/
The difference between these characters is how they affect variables (such as $ name) and shell commands (such as date ). For any
In the Linux Shell environment, input and output redirection is supported, expressed by symbols .
0, 1, and 2RepresentStandard input, standard output, and standard errorInformation output. It can be used to specify the standard input or output to
Common scripts in Linux include bash and shell.
1
#!/bin/bashecho "hello bash" #display one message
Save the preceding content as a text file named me. The extension is arbitrary, but. Sh is often used as the extension.
Run the command chmod A + x
#! /Bin/sh# The first line is to tell the system who will execute this dumb.
$ ## Number of parameters transferred to the script$ # ID of the current process during script running, often used as the suffix of temporary variables, such as haison. $$!
Linux Shell is actually a command interpreter that explains the commands entered by users and sends them to the kernel. In addition, shell has its own programming language for editing commands. It allows users to write programs composed of shell
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.