Search Results

Search: Posts Made By: justbow
1,315
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...
10,189
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,255
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,255
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
796
Posted By junior-helper
awk '$1 !~ /^[0-9]*$/ {key=$0; next} {print key,...
awk '$1 !~ /^[0-9]*$/ {key=$0; next} {print key, $0}' file
796
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}...
1,409
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,409
Posted By Scrutinizer
Try: awk '!/EPC-IpAddress:/{print $2}' RS= file
Try:
awk '!/EPC-IpAddress:/{print $2}' RS= file
1,054
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 ...
966
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
966
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
966
Posted By Akshay Hegde
$ grep -E '2014[[:digit:]]{4}23' file ...
$ grep -E '2014[[:digit:]]{4}23' file
2014112023
2014020123
2014020123
2014030223
94,115
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:


...
2,538
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,302
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
Showing results 1 to 15 of 15

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