Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > checking for co...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 2146 of 2234
Post > Topic >>

checking for corrupted files

by Seb <spluque@[EMAIL PROTECTED] > Jan 29, 2008 at 10:09 PM

Hi,

I would like to check if some simple text files have been corrupted.  A
manual/visual check of a few of the files shows that some of them
contain "garbage" characters in them.  I can't directly "see" what those
characters are, but they can be found at any part of the file.  The
information I'm after is simply the name of the file that is corrupted.
So I thought the following would do:

awk '/[^[:alnum:]]/ {print FILENAME}' *

Since, if IIUC, [:alnum:] represents all alphabet letters (upper and
lower case) and all digits, punctuation marks and symbols, which are
part of the uncorrupted files.  Basically, print the file name a line
does NOT match any of these characters.  Is this a good way to spot
those corrupted files?


Cheers,

-- 
Seb




 2 Posts in Topic:
checking for corrupted files
Seb <spluque@[EMAIL PR  2008-01-29 22:09:58 
Re: checking for corrupted files
Ed Morton <morton@[EMA  2008-01-29 21:42:59 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun May 11 16:55:51 CDT 2008.