Search Results

Search: Posts Made By: inditopgun
941
Posted By balajesuri
perl -F, -ane ' if ($F[1] =~ /M$/i) {...
perl -F, -ane '
if ($F[1] =~ /M$/i) { chop($F[1]); $F[1]/=1024; $x{uc($F[0])} += $F[1]; }
elsif ($F[1] =~ /K$/i) { chop($F[1]); $F[1]/=(1024*1024); $x{uc($F[0])} += $F[1]; }
else { chop($F[1]);...
941
Posted By Scrutinizer
awk -F, '{m=1; $0=toupper($0)} $2~/M$/{m=2**10}...
awk -F, '{m=1; $0=toupper($0)} $2~/M$/{m=2**10} $2~/K$/{m=2**20} {S[$1]+=$2/m} END{for(i in S){print i,S[i]}}' OFS=, infile
941
Posted By itkamaraj
$ nawk -F,...
$ nawk -F, '/[mM]$/{size=$2+0;size=$2/1024}/[kK]$/{size=$2+0;size=$2/(1024*1024)}/[gG]$/{size=$2+0} {a[toupper($1)]+=size;next}END{for(i in a){print i,a[i]}}' test.txt
KLK 46
CKF 0.230762
DFK...
1,769
Posted By yifangt
RE:
Good! It's clearer than last time, and the situation is simpler than what I thought .For simplicity I changed the description to string. e.g. CS111 = Student 1 + Course1 + variable1 and so on. ...
1,769
Posted By yifangt
there is answer on this recently.
This is the transposition of matrix. Check the post of acp, an awesome script there.
www.unix.com/shell-programming-scripting/18897-row-column-transpose.html...
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 04:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy