Search Results

Search: Posts Made By: CM64
7,570
Posted By CM64
It works!!! Thank you very much. It'was some...
It works!!! Thank you very much. It'was some stupid error of mine. I don't understand why but it works. If you have a little time could you please explain the syntax

$ awk ' { arr[$2]=$0 } END { ...
7,570
Posted By CM64
Ok. Input file date mac ip 01:01:01:10.01...
Ok. Input file

date mac ip
01:01:01:10.01 aa:bb:cc:dd:ee:ff 1.2.3.4
01:01:01:10.02 aa:bb:cc:dd:ee:ff 1.2.3.3
01:01:01:10.03 aa:bb:cc:dd:ee:ff 1.2.3.5
01:01:01:10.04 aa:bb:cc:dd:ee:ff 1.2.3.8...
7,570
Posted By CM64
Thank you very much but I don't understand. I...
Thank you very much but I don't understand. I know is a fault of mine, I am a very beginning awk scripter. Can you give me a complete code, it' seems to me that is the key statement that is the "key"...
7,570
Posted By CM64
I don't understand very well where you say "add...
I don't understand very well where you say "add conditions according to your needs". The matter is a little more complicated, I've got about 2.000 entries, sometimes I've got something like this
...
7,570
Posted By CM64
parse an arpwatch file and retain most recent mac
Hi,

I'm working on a little script, for first I transformed epoch (unix date in seconds) in a human readable date in this way

cat arp.dat | sort -k 3 | gawk '{ print strftime("%d:%m:%Y:%H:%M",...
15,030
Posted By CM64
Tomorrow I will try your last suggestion. A...
Tomorrow I will try your last suggestion. A unique file is good, but I have to prepend to every line of output the ip of the swith, if not I know where is the port and the associated mac but I don't...
15,030
Posted By CM64
About troubleshoothing you are right, you have...
About troubleshoothing you are right, you have helped so much so it's better that I do something as well, but I have no files, one per host in /tmp. I suspect that the error is due to this line of...
15,030
Posted By CM64
It's a good one, but I do not want to add to much...
It's a good one, but I do not want to add to much complexity for the moment (now the script is very simple and I alredy need a lot of help ...). By the way, the host trick gives me some troubles....
15,030
Posted By CM64
No, I am sure it works but sure, I've done some...
No, I am sure it works but sure, I've done some changes in the original because that one doesn't work. There was an error in snmpwalk syntax (for my switch of course, for others maybe it works well),...
15,030
Posted By CM64
I've done a man egrep and indeed egrep -f canno't...
I've done a man egrep and indeed egrep -f canno't work in our case.

Everyway the awk solution works well. I've got the host issue to solve and my little script is ready. Of course I can make one...
15,030
Posted By CM64
I'm testing the egrep solution but I have no...
I'm testing the egrep solution but I have no match. Maybe I do some errors.

This is the egrep command

egrep -f upd_file master_file > matched_file

I suppose upd_file is the one with ip port...
15,030
Posted By CM64
Thank you, very fast and useful replay, it works....
Thank you, very fast and useful replay, it works.

Another question, my first script (or better Ivanov script see...
15,030
Posted By CM64
Compare two files and merge columns in a third
Hi,

I'm working with snmp, with a little script I'm able to obtain from a switch a list with a couple of values with this format

Port Mac
1 00:0A:0B:0C:0D:0E
....
(hundred of entries)

...
Showing results 1 to 13 of 13

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