Search Results

Search: Posts Made By: ikke008
6,422
Posted By tukuyomi
Try this script: awk ' BEGIN{A[1]="in...
Try this script:
awk '
BEGIN{A[1]="in exit.c"; A[2]="dl-fini.c"; A[3]="in genops.c"}

{for(i in A)if($0~A[i])B[i]++}

END{for(i in A){print B[i]"\t"A[i]}}' gdb_output
1,853
Posted By edehont
To be honest, I've hardly ever worked with bc...
To be honest, I've hardly ever worked with bc before. I just took a glimpse at the man page and came up with this idea. Since we are mixing strings and expressions, the print command seemed the way...
1,853
Posted By edehont
If you want (slash need) to stick to sed and bc,...
If you want (slash need) to stick to sed and bc, try this:

sed 's/^\(.*:\)\([0-9]*\),*\([0-9]*\):\([0-9]*\),\([0-9]*\)/print \"\1\2,\3:\4,\5:\",\4\.\5-\2\.\3,\"\n\"/' beurs.txt|bc|sed...
1,853
Posted By ahamed101
Try this... awk -F:...
Try this...

awk -F: '{x=$0;gsub(",",".");y=$3-$2;gsub("\\.",",",y); print x OFS y }' OFS=: infile
--ahamed
Showing results 1 to 4 of 4

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