The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 02-04-2002
mib mib is offline
Registered User
 

Join Date: Jan 2001
Location: Calicut
Posts: 228
In bash it would be something like this.

if test -f "$file"
then
echo "$file: Regular File"
fi


or you can use if [ -f $file ] ....