On Wed, Dec 01, 1999 at 10:07:41PM -0500, Jason Costomiris wrote:
> On Wed, Dec 01, 1999 at 08:38:35PM -0600, Rick L. Mantooth wrote:
> : #!/bin/sh
> : # tabs.awk
> : # Usage: cat Some_File | tabs.awk
> 
> You lose points for the spurious use of cat. :-)  Double point loss for 
> invoking bash, then awk on top of that, rather than just 
> 
> #!/usr/bin/awk -f
> {gsub("\t","|",$0); print $0}
> 
> : # or cat Some_File | tabs.awk > New_File
> : awk '{gsub("\t","|",$0); print $0}'
> : #end tabs.awk
> 
> Not bad though.. :-)  Try this on for size..
> 
> #!/usr/bin/perl
> while(<>){s/\t/|/g;print;}
I feel useless for doing this but what the heck
#!/usr/bin/perl
map{y/\t/|/;print;} <>;
as we can see mine is slightly smaller (and totally abuses perl ;)). the
question is can anyone do it shorter???
> 
> Invoke this as:
> 
> convert < infile > outfile
> 
invocation is the same :) 
> perl -e "print join q/ /,split(q/z/,reverse qq/rekcahzlrepzrehtonaztsuj/);"
> 
> -- 
>                  Jason Costomiris <><
>             Technologist, cryptogeek, human.
> jcostom {at} jasons {dot} org  |  http://www.jasons.org/
> 
> 
> -- 
> To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
> as the Subject.


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to