[olug] bash help (awk/sed)

troehr at nj-onramp.com troehr at nj-onramp.com
Fri Jun 18 17:38:41 UTC 2004


Now we're just waiting for the Perl Mongers to chime in... ;^)

Later,

Tom

Quoting Mike Hostetler <hostetlerm at gmail.com>:

> On Fri, 18 Jun 2004 10:45:01 -0500, troehr at nj-onramp.com

> <troehr at nj-onramp.com> wrote:
> > 
> > Or to avoid awk,
> 
> Or use awk for everything:
> 
> for f in `ls -1 *.txt`; do
>   awk --assign infile=$f '/[0-9]+?-[A-F]/ {print $0 "," infile}' $f
> done
> 
> 
> -- mikeh
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug
> 





More information about the OLUG mailing list