lkml.org 
[lkml]   [2007]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [patch 1/3, resend] scripts: replace gawk, head, bc with shell, update
From
On Tue, Feb 06, 2007 at 09:49:47AM -0500, Mark Lord wrote:
> Oleg Verych wrote:
> >scripts: replace gawk, head, bc with shell, update
> >
> > Replacing overhead of using some (external) programs
> > instead of good old `sh'.
> ... <---------------,
> >- t4=`echo $t3 | gawk '{ print $1 }'` |
> >- t5=`echo $t1 | gawk '{ print $1 }'` |
> >- t6=`echo $t4 - $t5 | tr a-f A-F` |
> >- t7=`( echo ibase=16 ; echo $t6 ) | bc` |
> >+ t4=`field 1 $t3` |
> >+ t5=`field 1 $t1` |
> >+ t6=`printf "%lu" $((0x$t4 - 0x$t5))` |
> ... |
> |
> >From where do we obtain this new "field" command ? |
`---- here -----'

Without jokes, it even commented:

+# awk style field access
+field() {
+ shift $1 ; echo $1
+}
+

> Cheers
____
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-02-06 17:43    [W:0.055 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site