Search Results

Search: Posts Made By: mv652
6,280
Posted By mv652
Hi just in case anyone reads this thread wants to...
Hi just in case anyone reads this thread wants to know if it was solved.

I eventually realised the lines were, in fact, been truncated correctly. When 'cat <output-file>', I had the output...
6,280
Posted By mv652
Yeah, I tried that too. The output is still...
Yeah, I tried that too. The output is still misses lines 1 and 2

$ awk '{$1=$1}ORS=NR%3?",":RS' test2 > file
$ cat file
,0 output errors, 0 collisions, 0 interface resetsred
,0 output errors,...
6,280
Posted By mv652
Thanks, That removes spacing between the...
Thanks,

That removes spacing between the first "," and the "0"; however it is still missing the first and second line details:


$ awk '{$1=$1}ORS=NR%3?",":RS' test2

,0 output errors, 0...
6,280
Posted By mv652
Is this correct? FastEthernet0/0 is up,...
Is this correct?


FastEthernet0/0 is up, line protocol is up
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 output errors, 0 collisions, 0 interface resets
Serial1/0:0 is up,...
6,280
Posted By mv652
Hmm.. I get exactly the same output as with the...
Hmm.. I get exactly the same output as with the other commands.

Testing that I have the right syntax, I use: awk 'NF{cnt++}ORS=(cnt%1)?", ":RS' test2

This gives me the whole file input...
6,280
Posted By mv652
Hope I post this right.. cat <inout...
Hope I post this right..


cat <inout file> gives me:

FastEthernet0/0 is up, line protocol is up
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 output errors, 0...
6,280
Posted By mv652
Hi, thanks but the system I am using does not...
Hi, thanks but the system I am using does not have nawk installed.

The awk syntax I presented above worked fine on a Fedora server, but moving the script to CentOS, it no longer works.


I'd...
6,280
Posted By mv652
Merge lines in a file with Awk - incorrect output
Hi,

I would like:

FastEthernet0/0 is up, line protocol is up
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 output errors, 0 collisions, 0 interface resets
Serial1/0:0 is...
37,072
Posted By mv652
Ok, great. Thank you for taking the time to...
Ok, great.

Thank you for taking the time to answer.


Regards,
37,072
Posted By mv652
I'm trying to understand better what your script...
I'm trying to understand better what your script does so I can manipulate it to do an additional check on the first field (I want to ensure the lines been compared have the first field within 5...
37,072
Posted By mv652
Understood. One thing I may be able to do is...
Understood.

One thing I may be able to do is sort the packets first by order of packet size, making sure they are still in order of time received after that.


Thanks for confirming.


Mario
37,072
Posted By mv652
vidyadhar85, To answer your question, I have...
vidyadhar85,

To answer your question, I have a text file containing data from a network capture.

The data is duplicated (on purpose) and is sent to two destinations (multicast addresses). ...
37,072
Posted By mv652
Thanks
That's great, you've given me what I needed!!

Thank you so much for replying.


Best Regards,
Mario
37,072
Posted By mv652
Awk - Compare fields and increment variables
Hi,

My first post to this group...

I have a need to to parse a source file which is a capture from a network analyser.

I have two fields that need to be checked:
- Field 7 represents the...
Showing results 1 to 14 of 14

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