SPUG: Checking for ASCII files
Lorraine Johnson
lorraine.johnson at elektrobit.com
Tue May 15 14:16:02 CDT 2001
Thanks James, we'll give that a try.
Our projects have a quite a few files. On my machine, Perl lists out at
2198 files and 296 folders. We tend to be about that size.
Lorraine
-----Original Message-----
From: James Moore [mailto:james at banshee.com]
Sent: Tuesday, May 15, 2001 12:07 PM
To: Lorraine Johnson
Cc: 'spug-list at pm.org'
Subject: Re: SPUG: Checking for ASCII files
Consider calling the UNIX "file" utility (usually found in
/usr/bin/file) from your script. Not a great idea if you've got huge
numbers of files (since you're going to be forking and exec'ing too
often), but you may find that some of the other facilities offered by
file would be useful.
James Moore
james at banshee.com
Lorraine Johnson wrote:
> What is the best way to determine if a file
> is ASCII or non-ASCII?
>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
More information about the spug-list
mailing list