90
if [ ! -f /tmp/foo.txt ]; then echo "File not found!" fi
81
#!/bin/bash file=./file if [ -e "$file" ]; then echo "File exists" else echo "File does not exist" fi
#!/bin/bash file=./file if [ ! -e "$file" ]; then echo "File does not exist" else echo "File exists" fi
80
#!/bin/bash FILE=$1 if [ ! -f "$FILE" ] then echo "File $FILE does not exist" fi
63
[[ -f $FILE ]] || printf '%s does not exist!\n' "$FILE"
if [[ ! -f $FILE ]]; then if [[ -L $FILE ]]; then printf '%s is a broken symlink!\n' "$FILE" else printf '%s does not exist!\n' "$FILE" fi fi
60
if [ ! -f "$file" ]; then echo "$file" fi
test -f "$file" || echo "$file"
[ -f "$file" ] || echo "$file"