Search Results

Search: Posts Made By: justbow
1,293
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,970
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,200
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,200
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
785
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}...
785
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,394
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,394
Posted By Scrutinizer
Try: awk '!/EPC-IpAddress:/{print $2}' RS= file
Try:
awk '!/EPC-IpAddress:/{print $2}' RS= file
1,038
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 ...
951
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
951
Posted By Akshay Hegde
$ grep -E '2014[[:digit:]]{4}23' file ...
$ grep -E '2014[[:digit:]]{4}23' file
2014112023
2014020123
2014020123
2014030223
951
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,461
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,290
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
92,832
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 08:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy