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 -->
  #6 (permalink)  
Old 02-04-2002
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline
Registered User
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
file command?

I don't know how well it works in a script, but I have used the "file" command to tell a file type.

# file filename
filename :ascii text

# file script.sh
script.sh :commands text

It works from the command line very well.


Here is another suggestion...

Are all of your files in one directory? If so, you can do a for loop.

for name in `ls *`
do
test -f $name
some other command
some other command
done


__________________
My brain is your brain

Last edited by Kelam_Magnus; 02-04-2002 at 11:46 AM..