The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
How to determine if a file is ASCII?
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Directory
Register
Forum Rules
FAQ
Contribute
Members List
Search
Today's Posts
Mark Forums Read
Thread
:
How to determine if a file is ASCII?
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
02-04-2002
mib
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 ] ....
mib
View Public Profile
Visit mib's homepage!
Find all posts by mib