Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to check if file exists?

Status
Not open for further replies.

ddiamond

Programmer
Apr 22, 2005
918
US
In a ksh script, how would I check if a file exists?
 
'man test'
Code:
if [ -e path2file ]; then
   echo 'file exists'
fi

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top