Unix Command for finding Nul Characters

Hi Folks,

I have this windowed applescript application I use for sending out emails, it uses the Postfix daemon buit into my Mac Os X box, and a 3 SMTP servers (out of hundreds I send emails to) were refusing my messages replying "host smtp2.braspress.com.br[200.187.158.140] said: 550 Requested action not taken: NUL characters are not allowed. (in reply to end of DATA command)"

As a novice high-level programmer, I did not know that every character is represented by a hex value, and that I had two "gremlins" in my Template text (used to send out the emails after text manipulation), I mean, I had two hex values = 00.

A experienced Objective C programmer, friend of mine, taught me the what these Nul characters are and helped me removing these from my text. I was using a text application that did not show me the little gremlins.

As I move on forward with my learning, I am wondering if there is a Unix command I can use to detect these Gremlins, and so create a routine in my application to check the consistency of any text I use for sending out emails.

I thank you for your comments,

Bernardo H�hl
Rio de Janeiro - Brazil

Bernardo,

Voc� � afortunado estar em Bazil bonito! I need to find a way down there.

You can use "octal dump" to view/parse for any such characters. Look at the output of "od -c" against the file and read the man page for "od".

Cheers,

Keith

Hi kduffin,

Thanks for the help!

My man page for od says:

odhas been deprecated in favor of hexdump(1).

Hexdump,if called as ,provides compatibility for the options listed above.

I guess hexdump is about the same thing. Isn't it?

I apparently get the same results as is od...

I have learned a lot today.

Thank you!

Bernardo