![]() f $file checks if the file exists on system and it is a file s $file checks if the file exists on system and it is not empty ![]() r $file checks if the file exists on system and it is readable w $file checks if the file exists on system and if it is writable e $file checks if the file exists on system d $file checks if the file exists and is it’s a directory z $var1 checks if var1 has a length of zero n $var1 checks if var1 has a length greater than zero ![]() ![]() If grep -q foo $var2 checks if var1 is greater than var2 How to check if a string contains a substring in Bash : If & thenĮcho "'$var' is non-empty and the file exists" Expression1 & expression2 - true if both expression1 and expression2 are true.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |