08-28-2009
The date -d doesnt work in my version of unix.
Therefore I have been trying to follow the approach by vbe to write a specific line to all the log files in every 5 mins.
But I am facing another issue with sed:
check_param="Fri Aug 28 12:59:14 BST 2009ALERT CHECKPOINT"
Then Im using sed to get all the lines after the above string from the log files like below:
sed -n /$check_param/,$p test.log
But Im getting the error: sed: 0602-404 Function /Fri cannot be parsed.
If I use the string itself instead of the variable, im getting the correct output. I believe I am not using the variable in sed correctly.
Thanks
D
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello Friends,
I want to write a script for the following:
nlscux62:tibprod> grep "2008 Apr 30 01:" SA_EHV_SPEED_SFC_IN_03-SA_EHV_SPEED_SFC_IN_03-2.log | grep -i post | more
2008 Apr 30 01:01:23:928 GMT +2 SAPAdapter.SA_EHV_SPEED_SFC_IN_03-SA_EHV_SPEED_SFC_IN_03-2 Info AER3-000095 IDOC... (2 Replies)
Discussion started by: satyakam
2 Replies
2. Shell Programming and Scripting
hiii,
i have to write a shell script like this----
i have a huge log file name abc.log .i have to search for a pattern name "pattern",it may occur 1000 times in the log file,every time it finds the pattern it should display the 10 lines above the pattern.
I appericiate your help. (30 Replies)
Discussion started by: namishtiwari
30 Replies
3. Shell Programming and Scripting
Hi Experts,
I am writing a shell/Perl script tp get a time diffrence of two lines in a log file. I am pasting a snippet of my log file, how it look likes.
Sun Apr 26 02:11:03.162 2009 Greenwich Standard Time LOW: pid 488 tid 2072: 0: 251360: calling ARRF_LIB_Evaluate.
Sun Apr 26... (24 Replies)
Discussion started by: namishtiwari
24 Replies
4. Shell Programming and Scripting
Hi,
anyone has any ideas on how do we extract lines from a file with format similiar to this: (based on current time)
Jun 18 00:16:50 .......... ............. ............
Jun 18 00:17:59 .......... ............. ............
Jun 18 01:17:20 .......... ............. ............
Jun 18... (5 Replies)
Discussion started by: faelric
5 Replies
5. Shell Programming and Scripting
I have files that store multiple data points for the same device "vertically" and include multiple devices. It repeats a consistant pattern of lines where for each line:
Column 1 is a common number for the entire file and all devices in that file
Column 2 is a unique device number
Column 3 is... (7 Replies)
Discussion started by: STN
7 Replies
6. Shell Programming and Scripting
Dear All,
Please advice me, I have a text file with one field date and time like below given. I need to find out the lines whchi content the time stamp between
Wed May 26 11:03:11 2010 and Wed May 26 11:03:52 2010 both can be included, using awk command which could be an interactive so that I... (6 Replies)
Discussion started by: chinmayadalai
6 Replies
7. Shell Programming and Scripting
Hello
I have a file in following format:
IV 08:09:07
NM 08:12:01
IC 08:12:00
MN 08:14:20
NM 08:14:15
I need a script to compare time on each line with previous line and show the inconsecutive line. Ex.:
08:12:00
08:14:15
A better way... (6 Replies)
Discussion started by: vilibit
6 Replies
8. Shell Programming and Scripting
Hello community,
what I need to do is read 2 rows at time from a file. I have this simple solution:
File to read:
LINE1
LINE2
LINE3
LINE4
LINE5
LINE6
LINE7
LINE8Read routine:#!/bin/ksh
sed '1,3d' /out.txt | while read line; do
read line2
echo $line $line2
doneResult:LINE1... (5 Replies)
Discussion started by: Lord Spectre
5 Replies
9. Shell Programming and Scripting
Hello All,
I have a file like below....
dn: cn=user1,ou=org,o=org
cn=user1
uid=user1
cn=user2,ou=org,o=org
cn=user2
uid=user2
cn=user3,ou=org,o=org
cn=user3
cn=user33
uid=user3
cn=user4,ou=org,o=org
cn=user4
uid=user4 (6 Replies)
Discussion started by: s_linux
6 Replies
10. Shell Programming and Scripting
I was looking at this script which outputs the two lines which differs less than one sec.
#!/usr/bin/perl -w
use strict;
use warnings;
use Time::Local;
use constant SEC_MILIC => 1000;
my $file='infile';
## Open for reading argument file.
open my $fh, "<", $file or die "Cannot... (1 Reply)
Discussion started by: cele_82
1 Replies
LEARN ABOUT DEBIAN
rumakeindex
rumakeindex(1) teTeX rumakeindex(1)
NAME
rumakeindex - process a LaTeX index using Russian Cyrillic characters
SYNOPSIS
rumakeindex basename
DESCRIPTION
rumakeindex is used to run makeindex(1) on idx files that use Russian characters. It is part of the T2 package.
rumakeindex runs sed(1) on the idx file to convert Cyrillic character commands to 8-bit ASCII characters; pipes the results through makein-
dex(1); and then through tr(1) to do some final conversions. The results are placed in a KOI8-R encoded ind file.
FILES
basename.idx
LaTeX index entry file
basename.ilg
LaTeX index log file
basename.ind
LaTeX processed index file
BUGS
None known, but report any bugs found to the authors.
COPYRIGHT
The T2 package is Copyright 1997-1999 Werner Lemberg, Vladimir Volovich and any individual authors listed elsewhere in package files.
It may be distributed under the conditions of the LaTeX Project Public License, either version 1.1 of this license or (at your option) any
later version.
SEE ALSO
makeindex(1), sed(1), tr(1), <ftp://ftp.vsu.ru/pub/tex/T2/README>.
AUTHOR
Werner Lemberg <wl@gnu.org>, Vladimir Volovich <TeX@vvv.vsu.ru>.
This manual page was written by C.M. Connelly <c@eskimo.com>, for the Debian GNU/Linux system. It may be used by other distributions with-
out contacting the author. Any mistakes or omissions in the manual page are my fault; inquiries about or corrections to this manual page
should be directed to me (and not to the primary author).
teTeX September 2000 rumakeindex(1)