Quote:
Originally Posted by vermaden
Code:
if [ -f file ]; then
echo "file exists"
fi
if [ -d dir ]; then
echo "dir exists"
fi
|
I know already that.
and i can use else to do things i want if file doesn't exist...
Code:
if [ -d dir ]; then
echo "dir exists"
else
echo "dir doesn't exist"
fi
but is there a way to do it straight
cause i need action only if it doesn't exist (If doesn't exist, then do this and that)