• 1 reply
  • Latest Post - ‏2010-04-27T19:13:18Z by ishields
1 Post

Pinned topic exempl de test command of linux

‏2010-04-27T18:52:12Z |
I need a small example on the test command unix
how to test a file exists or nn, or nn executable .... and tested on small chain of characters such as test functions on digital ...

  1. # # #

B-File - File exists and is a block special file.
C-file - File exists and is a character special file.
D-File - File exists and is a directory.
E-File - File exists.
-F file - file exists and is a regular guy.
G-file - file exists and its Set Group ID bit is active.
H-File - File exists and is a symbolic link.
K-File - File exists and the sticky bit is set.
L-File - File exists and is a symbolic link (same as-h).
P-File - File exists and is a named pipe (named pipes, FIFO).
R-File - File exists and is readable.
-S File - File exists and has a size greater than zero.
U-File - File exists and Bit Set User ID is active.
Does descriptor - The descriptor file is open and associated with a terminal.
W-File - File exists and is specified as writable.

String Functions edit
-N String1 - The length of the String1 is not zero.
-Z String1 - The length of the String1 is zero.
String1 = string2 - String1 and string2 are identical.
String1! = String2 - String1 and string2 are different.
String1 - String1 is not a null string.

Numeric Functions edit
Integer1 eq Integer2 - Integer1 Integer2 and are algebraically speaking, equal.
Integer1 Integer2-do - is not equal to Integer1 Integer2.
Integer1-gt Integer2 - Integer1 is strictly greater than Integer2.
Integer1-ge Integer2 - Integer1 is greater than or equal to Integer2.
Integer1-lt Integer2 - Integer1 is strictly less than Integer2.
Integer1 it Integer2 - Integer1 is less than or equal to Integer2.
File1-nt file2 - file1 is newer than file2.
File1-ot file2 - file1 is older than file2.
File1-ef file2 - file1 file2 and point to the same file
please I have a tp-morrow I must report concludes the presentation and the application is not and I get to solve with its terminal if it please you help me and send the prints to your terminal if you have such a good market
Updated on 2010-04-27T19:13:18Z at 2010-04-27T19:13:18Z by ishields