Read about check if grep returns nothing bash, The latest news, videos, and discussion topics about check if grep returns nothing bash from alibabacloud.com
This article is also the second of the book note in Chapter 4 Basic shell programming of learning the bash shell 3rd edition, but we will not limit it to this.
String operation
In the following description, ":" Can be deleted. "Yes" means "exist
This is my moves to write bash programs. There's nothing new here, but from my experience people love to abuse bash. They ignore computer science and create "big clay balls" from their programs: software systems that are not clearly structured.
I. Case ORDERCase variable invalue1)Command (s);;value2)Command (s);;*)Command (s);;EsacIf the case variable is not matched, the program executes *) after the statement.Shell wildcard and vertical bar (|) are allowed as the OR operator in case
LS Displays current directory contents
1 ls/(Display all directories and files under the root directory)
2 Ls-l/(displays all directories and files in the root directory in the form of a list)
3) command 2 is equivalent to LL/
Absolute path and
1 First Test "/etc/vsftpd", "/etc/hosts" is the directory, and through the "$?" Variable view returns a status value to determine the test result.[Email protected] ~]# [-d/etc/vsftpd][[email protected] ~]# echo $?1[[email protected] ~]#
@ Wooyun ssh connects to Linux. if you want to disable the connection, you can run the nohup command nohup/opt/phpfpm/bin/phphotel to run a program in the background. php & amp; appendingoutputtonohup appears. you can view the process pid in ps-ef
@ Wooyun ssh connects to Linux. If you want to disable the connection, you can use the nohup command to run a program in the background.Nohup/opt/phpfpm/bin/php hotel. php &Appending output to nohup. out is correct.You can run ps-ef to view the
8.1 First Test "/etc/vsftpd", "/etc/hosts" is the directory, and through the "$?" Variable view returns a status value to determine the test result.[Email protected] ~]# [-D/ETC/VSFTPD][[email protected] ~]# echo $?0[Email protected] ~]#
A Shell introduction: 1 descriptionThe shell is a program written in C that is a bridge for users to use Linux. The shell is both a command language and a programming language.A Shell is an application that provides an interface through which users
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.