Hey Folks,
I have a file that contains data that I am working with, sometimes this file has a very long string of text that messes with an awk command in a script i am trying to build. I would like to cut this string of text out of a file and then redirect everything except that string to a new... (5 Replies)
Hi, I'm trying to output all text from the first paragraph in a file that contains a specific string through the last paragraph in that file that contains that string.
Previously, I was outputting just each paragraph with that search string with:
cat in_file | nawk '{RS=""; FS="\n";... (2 Replies)
Hi,
I have the following text file:
8 T1mapping_flip02 ok 128 108 30 1 665000-000008-000001.dcm
9 T1mapping_flip05 ok 128 108 30 1 665000-000009-000001.dcm
10 T1mapping_flip10 ok 128 108 30 1 665000-000010-000001.dcm
11 T1mapping_flip15 ok 128 108 30... (2 Replies)
I have text file as follows and would like to remove the last occurance of "UNION ALL" string and replace @@ with single quote (').
Input text in file is
with temp as (
( select ----------- where OPERATION = @@B@@ and OBJECTTYPE = @@P@@ and start_time desc ) UNION ALL
( select... (9 Replies)
Hi,
I have log file which rolls out every second which is as this.
HttpGenRequest - -<!--OXi dbPublish--> <created="2014-03-24 23:45:37" lastMsgId="" requestTime="0.0333"> <response request="getOutcomeDetails" code="114" message="Request found no matching data" debug="" provider="undefined"/>... (3 Replies)
Hi
This is my first post and I'm just a beginner. So please be nice to me.
I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file?
I have tried sed -n 241,241p... (13 Replies)
Hi,
I have a file(input.txt) and trying to format as output.txt. See the attached file format.
Note: This is a windows file (DOS format) and the commands are also going to execute on windows.
Basically I am trying to capture all the data in between Local Group Memberships and Global Group... (10 Replies)
I am trying to use awk to change a specific string in a field, if it is found, to another value. In the tab-delimited file the text in bold in $3 contains the string 23, which is always right before a ., if it is present.
I am trying to change that string to X, keeping the formatting and the... (3 Replies)
What I need is to remove the text from Location_file.txt from each line matching all entries from Remove_location.txt
Location_file.txt
FlowPrePaid, h3nmg1cm2,Jamaica_MTAImageFileFlowPrePaid,h0nmg1cm1, Flow_BeatTest,FlowRockTest
FlowNewTest,FlowNewTest,h0nmg1cm1
PartiallySubscribed,... (3 Replies)
Discussion started by: ketanraut
3 Replies
LEARN ABOUT DEBIAN
cisco_ios2dlf
CISCO_IOS2DLF.IN(1) LogReport's Lire Documentation CISCO_IOS2DLF.IN(1)NAME
cisco_ios2dlf - convert cisco logs to dlf format
SYNOPSIS
cisco_ios2dlf
DESCRIPTION
This script expects syslog-type logs from a CISCO IOS router on stdin. These look like e.g.
Jul 3 00:00:39 router 40108: 4d09h: %SEC-6-IPACCESSLOGP:
list FR_VA_in permitted udp 192.168.19.1(137) (Serial0/0.2 DLCI 120)
-> 192.168.19.255(137), 2 packets
Jul 3 00:02:39 router 40109: 4d09h: %SEC-6-IPACCESSLOGP: list FR_VA_in
permitted udp 192.168.80.42(138) (Serial0/0.2 DLCI 120) ->
192.60.60.148(138), 1 packet
Jul 3 00:02:39 router 40110: 4d09h: %SEC-6-IPACCESSLOGDP: list FR_VA_in
permitted icmp 192.168.80.82 (Serial0/0.2 DLCI 120) -> 149.1.1.1 (8/0),
1 packet
or
Aug 19 04:02:34 gateway.foo.bar 218963: Aug 19 04:02:32.977:
%LINEPROTO-5-UPDOWN: Line protocol on Interface BRI0:1, changed state
to down
Aug 19 04:02:34 gateway.foo.bar 218964: Aug 19 04:02:33.262:
%ISDN-6-DISCONNECT: Interface BRI0:1 disconnected from 172605440 acme,
call lasted 42 seconds
Aug 19 04:02:35 gateway.foo.bar 218965: Aug 19 04:02:33.266:
%LINK-3-UPDOWN: Interface BRI0:1, changed state to down
Aug 19 04:02:38 gateway.foo.bar 218966: Aug 19 04:02:36.103:
%SEC-6-IPACCESSLOGP: list 102 denied tcp 100.198.139.148(4652) ->
100.193.176.49(80), 1 packet
Aug 19 04:02:45 gateway.foo.bar 218967: Aug 19 04:02:43.543:
%ISDN-6-LAYER2DOWN: Layer 2 for Interface BR0, TEI 86 changed to down
Aug 19 04:02:53 gateway.foo.bar 218968: Aug 19 04:02:51.471:
%SEC-6-IPACCESSLOGP: list 102 denied tcp 100.74.103.1(2162) ->
100.193.176.98(80), 1 packet
The outputted dlf files look like:
994118619 permitted icmp 192.168.80.9 - Serial0/0.2 DLCI_120
192.168.19.1 - 1
994118619 permitted udp 192.168.19.1 138 Serial0/0.2 DLCI_120
192.168.19.255 138 1
EXAMPLES
To process a log as produced by Cisco IOS:
$ cisco_ios2dlf < cisco.log
cisco_ios2dlf will be rarely used on its own, but is more likely called by lr_log2report:
$ lr_log2report cisco_ios < /var/log/cisco.log
AUTHORS
Francis J. Lacoste based on initial code by Joost Bekkers <joost@jodocus.org>
VERSION
$Id: cisco_ios2dlf.in,v 1.8 2006/07/23 13:16:35 vanbaal Exp $
COPYRIGHT
Copyright (C) 2001 Joost Bekkers <joost@jodocus.org> Copyright (C) 2002 Stichting LogReport Foundation <logreport@logreport.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with
http://www.gnu.org/copyleft/gpl.html.
Lire 2.1.1 2006-07-23 CISCO_IOS2DLF.IN(1)