1FILE=/etc/resolv.conf
2if [ -f "$FILE" ]; then
3 echo "$FILE exists."
4else
5 echo "$FILE does not exist."
6fi
7
1>>> import os
2>>> os.path.isfile("d:\\Package1\\package1\\fibo.py")
3True
4>>> os.path.isfile("d:/Package1/package1/fibo.py")
5True
6>>> os.path.isfile("d:\\nonexisting.txt")