Search Results

Search: Posts Made By: justbow
1,251
Posted By Don Cragun
This thread is a duplicate of the thread Perl...
This thread is a duplicate of the thread Perl removing line match with pattern in column...
9,740
Posted By Don Cragun
Here is a slightly different approach that seems...
Here is a slightly different approach that seems to work:
awk -F"'" '
BEGIN { OFS = ","
h[++hc] = "recordOpeningTime"
h[++hc] = "servedMSISDN"
h[++hc] = "ratingGroup"
h[++hc] =...
1,166
Posted By MadeInGermany
For highest precision do the mult before the div ...
For highest precision do the mult before the div
$2*100/1024/1024/9787
or force to floating-point
$2/1024.0/1024/9787*100
1,166
Posted By vgersh99
printf("%.2f\n", $3/1024/.....) ----------...
printf("%.2f\n", $3/1024/.....)

---------- Post updated at 10:07 PM ---------- Previous update was at 10:05 PM ----------






No bc, no sed - just awk
771
Posted By RavinderSingh13
Hello justbow, Following may help you, it...
Hello justbow,

Following may help you, it will work only if we have not more than 2 columns and if this has one column it has the AA-HOST-04 etc values in it.


awk 'NF==1{V=$0;next}...
771
Posted By junior-helper
awk '$1 !~ /^[0-9]*$/ {key=$0; next} {print key,...
awk '$1 !~ /^[0-9]*$/ {key=$0; next} {print key, $0}' file
1,390
Posted By RudiC
To lose the EPC-Per=673,HYHGU as well, extend...
To lose the EPC-Per=673,HYHGU as well, extend above: awk '!/EPC-IpAddress:/ && /EPC-SessionId/ {print $2}' RS= file
1,390
Posted By Scrutinizer
Try: awk '!/EPC-IpAddress:/{print $2}' RS= file
Try:
awk '!/EPC-IpAddress:/{print $2}' RS= file
1,021
Posted By RavinderSingh13
Hello justbow, Following may help you in...
Hello justbow,

Following may help you in same.


awk '{X[$1]+=$2;Y[$1]+=$3;} END{for(i in X){print i OFS X[i] OFS Y[i]}}' OFS="\t" Input_file


Output will be as follows.

A 2 ...
947
Posted By Don Cragun
As long as you know that you're only working with...
As long as you know that you're only working with numeric input, a simpler approach is:
grep '2014....23' file
947
Posted By Akshay Hegde
$ grep -E '2014[[:digit:]]{4}23' file ...
$ grep -E '2014[[:digit:]]{4}23' file
2014112023
2014020123
2014020123
2014030223
947
Posted By PikK45
grep 2014[0-9][0-9][0-9][0-9]23 file
grep 2014[0-9][0-9][0-9][0-9]23 file
2,416
Posted By Don Cragun
The data you say you want in the results doesn't...
The data you say you want in the results doesn't match the headings in the 2nd and 3rd fields of your output. If the output you really want is:
number,bidirVol1,subsGName1,bidirVol2,subsGName2...
1,272
Posted By Scrutinizer
Try something like: awk '/Date:/{c=$2 FS $3}...
Try something like:
awk '/Date:/{c=$2 FS $3} NR>3{print c, $1 $2, $NF}' file
89,963
Posted By Neo
User Guide: Posting in the Emergency Forum
Emergency UNIX and Linux Support !! Help Me! Forum (Request Urgent Help) (https://www.unix.com/emergency-unix-linux-support-help-me/)

README FIRST: How to Request Emergency or Urgent Help:


...
Showing results 1 to 15 of 15

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