Testing a file exists
Published: Wednesday, Dec 26, 2007 Last modified: Thursday, Nov 14, 2024
Something like this:
[[ -e $1 ]] && echo $1 exists || echo $1 does not exist
Something like this:
[[ -e $1 ]] && echo $1 exists || echo $1 does not exist