script .sh: verifique se o arquivo existe
#!/bin/bash
if [ -e x.txt ]
then
echo "ok"
else
echo "nok"
fi
Mckynde
#!/bin/bash
if [ -e x.txt ]
then
echo "ok"
else
echo "nok"
fi