File exists

From KlavoWiki
Revision as of 00:31, 23 March 2009 by David (Sọ̀rọ̀ | contribs) (Created page with 'In BASH programming; If you want to check if a file exists: <pre> if [ -f filename ]; then fi </pre> Category : BASH')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

In BASH programming; If you want to check if a file exists:

if [ -f filename ];
  then
  fi