Re: How to delete non-ASCII chars in file

2008-09-05 Thread Mark B.
On Fri, Sep 5, 2008 at 1:38 PM, Giorgos Keramidas <[EMAIL PROTECTED]> wrote: > Does this look ok? Looks good to me. m ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any ma

Re: How to delete non-ASCII chars in file

2008-09-05 Thread Giorgos Keramidas
On Fri, 5 Sep 2008 12:27:12 -0400, "Mark B." <[EMAIL PROTECTED]> wrote: > On Fri, Sep 5, 2008 at 10:58 AM, Giorgos Keramidas > <[EMAIL PROTECTED]> wrote: > >> $ echo '^Fhello^F' | sed -e 's/[^[:print:]]*//' | hd >> 68 65 6c 6c 6f 06 0a |hello..| >> 0007 >>

Re: How to delete non-ASCII chars in file

2008-09-05 Thread Mark B.
On Fri, Sep 5, 2008 at 12:27 PM, Mark B. <[EMAIL PROTECTED]> wrote: > A follow question--is it possible to use that statement in a Makefile (BSD)? > A straight cut 'n paste didn't work, and I couldn't figure out the escaping to > make it work. Never mind, it works just fine. m ___

Re: How to delete non-ASCII chars in file

2008-09-05 Thread Mark B.
On Fri, Sep 5, 2008 at 10:58 AM, Giorgos Keramidas <[EMAIL PROTECTED]> wrote: > $ echo '^Fhello^F' | sed -e 's/[^[:print:]]*//' | hd > 68 65 6c 6c 6f 06 0a |hello..| > 0007 > $ Thanks. > The matching pattern is wrong. You need `[^[:print:]]'. The char

Re: How to delete non-ASCII chars in file

2008-09-05 Thread Giorgos Keramidas
On Fri, 5 Sep 2008 10:14:08 -0400, "Mark B." <[EMAIL PROTECTED]> wrote: > I have a text file that includes some non-ASCII characters > For example, opening the file in vi shows lines like this: > > 'easth_0.541716776378' 0 \xe2\x80\x98dire' 2 > > Is there a command-line tool I can use

How to delete non-ASCII chars in file

2008-09-05 Thread Mark B.
I have a text file that includes some non-ASCII characters For example, opening the file in vi shows lines like this: 'easth_0.541716776378' 0 \xe2\x80\x98dire' 2 Is there a command-line tool I can use to delete these characters? I tried: cat f | tr -cd [:print:] but this rem