Sponsored Content
Top Forums Shell Programming and Scripting [Solved] missing date in unix Post 302707789 by rabindratech on Sunday 30th of September 2012 01:39:02 AM
Old 09-30-2012
not giving correct output for example
Mg_Message_count,8-Aug-12,0 Mg_Message_count,9-Aug-12,0 Mg_Message_count,10-Aug-12,0 Mg_Message_count,11-Aug-12,0 Mg_Message_count,12-Aug-12,0 Mg_Message_count,13-Aug-12,0 Mg_Message_count,14-Aug-12,0 Mg_Message_count,15-Aug-12,0 Mg_Message_count,16-Aug-12,0 Mg_Message_count,17-Aug-12,0 Mg_Message_count,18-Aug-12,0 Mg_Message_count,19-Aug-12,0

those are not available in my file hence for those date will be 0
---------------
Logic
if date available then display
(for example:Mg_Message_count,07-Aug-12,42)
else display count 0
for example:Mg_Message_count,11-Aug-12,0

---------- Post updated at 12:39 AM ---------- Previous update was at 12:27 AM ----------

Please let me you have any doubt

Last edited by rabindratech; 09-30-2012 at 02:37 AM.. Reason: to clarify
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

[SOLVED] mysql.sock is missing..

mysql.sock file is missing in /opt/lampp/etc/ is there any backup file available in unix... since without that file .. project is not opening.. reply me as soon as possible ... (19 Replies)
Discussion started by: senkerth
19 Replies

2. UNIX for Advanced & Expert Users

Solved: Missing whatis file from my /usr/shar/lib directory...

My whatis file is missing from my /usr/share/lib directory. I know I can recreate it by using catman -w command. My question is, why do all of my other servers have it and this one doesn't. Maybe due to a recent move of old to new servers and it just wasn't copied over. Unlikely, 'cause all... (0 Replies)
Discussion started by: zixzix01
0 Replies

3. Shell Programming and Scripting

[Solved] line breaks missing when emailed from unix to win

hi i am sending an email from unix to windows platform and using uuencode to attach the plain text files (.txt). But when i read the attached file in notepad the linebreaks are gone. uuencode samplefile.txt samplefile.txt | mail -s "test email" <mailid.com> if i copy paste the... (6 Replies)
Discussion started by: midhun19
6 Replies

4. Shell Programming and Scripting

Missing date

hi team, i have a file contains data as follows F1 file --------------------------- date system name 1-jan-2012 x 1-jan-2012 y 1-jan-2012 x 5-jan-2012 y 3-jan-2012 z 3-jan-2012 z 4-jan-2012 x 4-jan-2012 x ... (13 Replies)
Discussion started by: rabindratech
13 Replies

5. Red Hat

[Solved: Missing A Record] DNS issue

Hi, I have recently built a new DNS server and created a new zone. I use an ESMTP server to handle mail and the new domain has been added to this. I can send mail to gmail and other domain addresses but unable to send it to one particular domain. (DSN:Service Unavailable) DNS... (2 Replies)
Discussion started by: Duffs22
2 Replies

6. Solaris

[solved] Group sysadmin missing

Hello all I recently installed a fresh copy of Solaris. I noticed that /etc/passwd does not contain an entry for sysadmin Group #14. Why isnt it there? Other websites state that by default it should be there ! Help! Regards, Junaid ---------- Post updated at 01:04 AM ----------... (1 Reply)
Discussion started by: Junaid Subhani
1 Replies

7. Shell Programming and Scripting

[Solved] Replace yesterday date with today's date except from the first line

Hello, I have a file like this: 2012112920121130 12345620121130msABowwiqiq 34477420121129amABamauee e7748420121130ehABeheheei in case the content of the file has the date of yesterday within the lines containing pattern AB this should be replaced by the current date. But if I use... (3 Replies)
Discussion started by: Lilu_CK
3 Replies

8. Solaris

[solved]Config/enable_mapping missing, how to add?

Issue resolved by upgrading from solaris 11 to solaris 11.1 I would like to enable network mapping. While using instructions from: https://blogs.oracle.com/VDIpier/entry/solaris_11_changing_the_hostname To change my hostname I noticed I am missing the enable mapping bool. What it should... (0 Replies)
Discussion started by: taltamir
0 Replies

9. Shell Programming and Scripting

Pipe output missing date?

I'd like to have the output from this script piped to a text file that has the date at the beginning of it. For example, my ideal would be something like this $./run_script.sh $ls *.out 2013-Feb-26-output_filename.out Here's the code I'm using. #! /bin/ksh DAT=`date '+%Y-%b-%d'` for... (2 Replies)
Discussion started by: DustinT
2 Replies

10. Shell Programming and Scripting

How to get the missing date and day in a table?

Hi Am using unix Aix Ksh Have Created table called vv and i have inserted two date Select * from vv; Output :- New_date 21/02/2013 24/02/2013 I have tried Using One query but Unsuccessful so far.. SELECT l.new_date + '1 day' as miss from vv as l (7 Replies)
Discussion started by: Venkatesh1
7 Replies
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)
All times are GMT -4. The time now is 10:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy