If parameter in shell script

Source: Internet
Author: User

[-A file] true if the file exists. <Br/> [-B file] If the file exists and is a special block file, it is true. <Br/> [-C file] If the file exists and is a special character file, it is true. <Br/> [-D file] If the file exists and is a directory, it is true. <Br/> [-e file] If the file exists, it is true. <Br/> [-F file] If the file exists and is a common file, it is true. <Br/> [-G file] If the file exists and the sgid has been set, it is true. <Br/> [-H file] If the file exists and is a symbolic connection, it is true. <Br/> [-K file] true if the file exists and the stick bits have been set. <Br/> [-P file] If the file exists and is a name pipe (f If O), it is true. <Br/> [-r file] true if the file exists and is readable. <Br/> [-s file] If the file exists and the size is not 0, it is true. <Br/> [-t fd] It is true if the file descriptor FD is opened and points to a terminal. <Br/> [-u file] true if the file exists and SUID (Set User ID) is set. <Br/> [-W file] If the file exists and is writable, it is true. <Br/> [-X file] true if the file exists and is executable. <Br/> [-o file] true if the file exists and belongs to a valid user ID. <Br/> [-G file] true if the file exists and belongs to a valid user group. <Br/> [-l file] If the file exists and is a symbolic connection, it is true. <Br/> [-N file] If the file exists and has been mod, it is true if IED since it was last read. <Br/> [-s file] If the file exists and is a socket, it is true. <Br/> [file1-nt file2] If file1 has been changed more recently than file2, or if file1file2 does not is true. <Br/> exists and [file1-ot file2] True if file1 is older than file2, or if file2 exists and file1 does not exist. <Br/> [file1-Ef file2] True if file1 and file2 point to the same device and node number. <Br/> [-O optionname] true if the shell option "optionname" is enabled. <Br/> [-Z string] "string" is true if its length is zero. <Br/> If the length of [-N string] or [String] "string" is non-zero, it is true. <Br/> [string1 = string2] If the two strings are the same. "=" May be used instead of "=" for strict POSIX compliance is true. <Br/> [string1! = String2] true if the strings are not equal. <Br/> [string1 <string2] True if "string1" sorts before "string2" lexicographically in the current locale. <Br/> [string1> string2] True if "string1" sorts after "string2" lexicographically in the current locale. 

Related Article

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.