Results 1 to 4 of 4
hi! Is it possible with AWK make a division?
For example, in a:
more /tmp/file.log | awk '{print $1,$4,$5,$7,$11}'
I would like to make a division ( $11/1000000 ) of ...
- 11-30-2009 #1Just Joined!
- Join Date
- Oct 2008
- Posts
- 48
Division in AWK
hi! Is it possible with AWK make a division?
For example, in a:
more /tmp/file.log | awk '{print $1,$4,$5,$7,$11}'
I would like to make a division ($11/1000000) of the colum $11
Is it possible???
- 12-04-2009 #2Just Joined!
- Join Date
- Oct 2008
- Posts
- 48
anybody help me?
- 12-04-2009 #3Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
- Posts
- 1,117
Hi.
Perhaps you could experiment with something like:
producing:Code:echo "1 2" | awk '{print $2/5}'
with versionCode:0.4
Best wishes ... cheers, drlCode:GNU Awk 3.1.5
Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )
- 12-04-2009 #4Just Joined!
- Join Date
- Oct 2008
- Posts
- 48
very thanks!
I'm going to experiment with this!


Reply With Quote