identify the file type

From: Adrian Sevcenco <Adrian.Sevcenco_at_cern.ch>
Date: Sun, 22 May 2011 13:52:44 +0300


Hi! Is there a way to identify the file type other than using a bash command like:
file -b $file | awk '{print $1}'

I want to distinguish between XML and ASCII file types. Thank you,
Adrian


Adrian Sevcenco                              |
Institute of Space Sciences - ISS, Romania | adrian.sevcenco at {cern.ch,spacescience.ro} |

Received on Sun May 22 2011 - 12:52:50 CEST

This archive was generated by hypermail 2.2.0 : Mon May 23 2011 - 17:50:01 CEST