Hi All,
I am new to UNIX Shell Scripting.
I want to know what is the difference between the following two statements.
if [ -f filename1.txt ]
and
if [ -s filename1.txt]
Thanks & Regards
Hi All,
I am new to UNIX Shell Scripting.
I want to know what is the difference between the following two statements.
if [ -f filename1.txt ]
and
if [ -s filename1.txt]
Thanks & Regards
The difference between the following two statements are:
if [ -f filename1.txt ]
test or check if filename1.txt exits
while
if [ -s filename1.txt]
test or check if filename1.txt exits and the size of filename1.txt is greater than zero
Thanks hassan2.....
$ man test
lists all the different flags you can use