Re: tr equivalent to sed command

2012-02-26 Thread Joel Rees
2012/2/25 夜神 岩男 : > On 02/25/2012 12:43 PM, Patrick O'Callaghan wrote: >> >> On Fri, 2012-02-24 at 21:22 +0900, 夜神 岩男 wrote: >>> >>> I'm trying to move a script from invoking lots of sed and awk to bash >>> builtins and I'm stumped on something I'm sure is simple. >>> >>> Is there a tr equivalent t

Re: tr equivalent to sed command

2012-02-25 Thread Patrick O'Callaghan
On Sat, 2012-02-25 at 17:29 +0900, 夜神 岩男 wrote: > On 02/25/2012 12:43 PM, Patrick O'Callaghan wrote: > > On Fri, 2012-02-24 at 21:22 +0900, 夜神 岩男 wrote: > >> I'm trying to move a script from invoking lots of sed and awk to bash > >> builtins and I'm stumped on something I'm sure is simple. > >> > >

Re: tr equivalent to sed command

2012-02-25 Thread 夜神 岩男
On 02/25/2012 12:43 PM, Patrick O'Callaghan wrote: On Fri, 2012-02-24 at 21:22 +0900, 夜神 岩男 wrote: I'm trying to move a script from invoking lots of sed and awk to bash builtins and I'm stumped on something I'm sure is simple. Is there a tr equivalent to the following? [...] You realize that

Re: tr equivalent to sed command

2012-02-24 Thread Patrick O'Callaghan
On Fri, 2012-02-24 at 21:22 +0900, 夜神 岩男 wrote: > I'm trying to move a script from invoking lots of sed and awk to bash > builtins and I'm stumped on something I'm sure is simple. > > Is there a tr equivalent to the following? [...] You realize that tr is not a Bash builtin, right? poc -- use

Re: tr equivalent to sed command

2012-02-24 Thread Anthony Messina
On 02/24/2012 06:22 AM, 夜神 岩男 wrote: > I'm trying to move a script from invoking lots of sed and awk to bash > builtins and I'm stumped on something I'm sure is simple. > > Is there a tr equivalent to the following? > sed 's/[^[:alnum:]]//g' > > I just can't seem to get tr -d to accept a negative

Re: tr equivalent to sed command

2012-02-24 Thread 夜神 岩男
On 02/24/2012 10:12 PM, fedora wrote: On 02/24/2012 01:22 PM, 夜神 岩男 wrote: I'm trying to move a script from invoking lots of sed and awk to bash builtins and I'm stumped on something I'm sure is simple. Is there a tr equivalent to the following? sed 's/[^[:alnum:]]//g' > Try > > tr -c [:alnum

Re: tr equivalent to sed command

2012-02-24 Thread fedora
Try tr -c [:alnum:] -c --complement suomi On 02/24/2012 01:22 PM, 夜神 岩男 wrote: I'm trying to move a script from invoking lots of sed and awk to bash builtins and I'm stumped on something I'm sure is simple. Is there a tr equivalent to the following? sed 's/[^[:alnum:]]//g' I just can

tr equivalent to sed command

2012-02-24 Thread 夜神 岩男
I'm trying to move a script from invoking lots of sed and awk to bash builtins and I'm stumped on something I'm sure is simple. Is there a tr equivalent to the following? sed 's/[^[:alnum:]]//g' I just can't seem to get tr -d to accept a negative matching set, but perhaps that's not possible?