Search This Blog

Sunday, October 1, 2023

Shell script 11

Question:

How to check the file is exist or not and if it exists then the size is zero or not

file="/home/kalam/if_condition.sh"

if [ -e $file ]

then

echo “File exists”

else

echo “File does not exist”

fi

## Checking for file size is Zero or not

 if [ -s $file ]

then

echo “File size is zero”

else

echo “File size is not zero”

fi



No comments:

Post a Comment

What is the sanity checks you have done for STA?

 Sanity checks for STA: Linking Checks: We need to check., is there any missing modules or missing pins in a library. this is done by link c...