I've been working on a bash script to parse through firewall logs (cisco). I'm nearing the end and have a dilemma.
My data looks as such (actual data is several gigs worth of logs - without the headers):
sourceIP destinationIP destinationProtocol destinationPort
I would like to script it so that the ports are put on a single line for matching IPs, like so:
sourceIP destinationIP destinationProtocol destinationPort
Would awk or sed be able to do what I'm looking for? How?
Any help would be much appreciated.
Last edited by vgersh99; 02-17-2016 at 07:48 PM..
Reason: code tags, please!
Hi,
I have a file like this.
please notice that ./usr/orders1/order_new_2627 appears more than once, thus needs to be merged.
I would like to merge the lines where the first column match
so the output should be like this:
Please help (2 Replies)
Hi guys i need help with comparing lines in 2 separate files. Both files contain the same amount of lines and i need to output the difference into the 2nd file.
The 1st file is always correct.
1st file (Expected.e):
Tuesday, 11 August 2009
Wednesday, 12 August 2009
Thursday, 13 August 2009... (2 Replies)
I have a large file (10M lines) that contains two columns: a frequency and a string, ex:
3 aaaaa
4 bbbbb
2 ccccc
5 aaaaa
1 ddddd
4 ccccc
I need to merge the lines whose string part is the same, while updating the frequency. The output should look like this:
8 aaaaa
4 bbbbb
5 ccccc... (2 Replies)
Hi,
I'm not a expert in shell programming, so i've come here to take help from u gurus.
I'm trying to tailor a csv file that i got to make it work for the LOAD FROM command.
I've a datatable csv of the below format -
--in file format
xx,xx,xx ,xx , , , , ,,xx,
xxxx,, ,, xxx,... (11 Replies)
Hi everyone. How can I merge two files, where each file has 2 columns and the first columns in both files are similar? I want all in a file of 4 columns; join command removes the duplicate columns.
1 Dave
2 Mark
3 Paul
1 Apple
2 Orange
3 Grapes
to get it like this in the 3rd file:... (9 Replies)
Hello! i have a text file.. which contains the data as follows
i want to merge the declarations lines pertaining to one datatype in to a single line as follows
i've searched the forum for help.. but couldn't find much help.. how can i do this?? (1 Reply)
Hi ,
I have few files which contains user name and data transfer rate in MBs and this data is collected for year and for each month report is saved in 12 different files I have to merge all the files to prepare the final report
Files are as below
Similarly I have 10 more files ... (5 Replies)
Hi,
Can anyone help me for merge the following multi-line log which beginning with a " and line ending with ": into one line.
*****Original Log*****
087;2008-12-06;084403;"mc;;SYHLR6AP1D\LNZW;AD-703;1;12475;SYHLR6AP1B;1.1.1.1;0000000062;HGPDI:MSISDN=12345678,APNID=1,EQOSID=365;... (3 Replies)