10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
So basically I have a log file and each line in this log file starts with a timestamp:
MON DD HH:MM:SS
SEP 15 07:30:01
I need to grep all the lines between last hour timestamp and current timestamp. Then these lines will be moved to a tmp file from which I will grep for particular strings. ... (1 Reply)
Discussion started by: nms
1 Replies
2. Shell Programming and Scripting
Hi,
I have a test.zip archive that contains
test.zip --> (file_1.txt, file_2.txt , file_3.txt)
I need to unzip the file like this,
file_1_timestamp.txt
file_1_timestamp.trg
file_2_timestamp.txt
file_2_timestamp.trg
file_3_timestamp.txt
file_3_timestamp.trg
Could you please let me know... (7 Replies)
Discussion started by: Shandel
7 Replies
3. UNIX for Dummies Questions & Answers
I have an xml file with header as below.
<Provider xmlns="http://www.xyzx.gov/xyz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xyzx.gov/xyz xyz.xsd" SCHEMA_VERSION="2.5" PROVIDER="5">
I want to get the schema version here that is 2.5 and put in a... (7 Replies)
Discussion started by: Ariean
7 Replies
4. Shell Programming and Scripting
Hi,
Trying to sort grep result based on timestamp of the filename.
I have the following result and want to sort them on timestampgrep -i 'ERROR' *log*2013*
s_m_xxx_xxx_xxx_xxx_xxxx.log.20130906092431:TRANSF_1_1_1> DBG_21216 Finished transformations for Source Qualifier . Total errors ... (5 Replies)
Discussion started by: bobbygsk
5 Replies
5. Shell Programming and Scripting
I want to grep the content performed by an User from a file. Suppose that i have a following file
HYD-HMS-2$ ls -lrt
-rw-r--r-- 1 sdfrun sdf 31726356 Aug 1 13:04 journal.03.01082012.19.csv
I could able to grep the content performed by a user by "sed" command as follows
HYD-HMS-2$... (0 Replies)
Discussion started by: duppalav
0 Replies
6. Shell Programming and Scripting
1) Is it possible to get tags content by grep -E ? For example title. Source text "<title>My page<title>"; to print "My page".
2) which bash utility to use when I want to use regex in this format?
(?<=title>).*(?=</title) (11 Replies)
Discussion started by: visitor123
11 Replies
7. UNIX for Dummies Questions & Answers
I've setup a cron job that greps a file every five minutes and then writes (appends) the grep output/result to another file:
grep "monkey" zoo.log | tail -1 >> cron-zoo-log
Is there any way I can add the date and time (timestamp) to the cron-zoo-log file for each time a new line was added?
... (12 Replies)
Discussion started by: Sepia
12 Replies
8. AIX
I want to read a log file from a particular location.In the log file each line starts with timestamp.I need to compare the timestamp in the logfile with the current date.If the timpestamp in the log file is less than 4 hours then i need to read the file from that location.Below is the file... (1 Reply)
Discussion started by: achu
1 Replies
9. AIX
I want to read a log file from a particular location.In the logfile , lines contains timestamp.I need to compare the timestamp in the logfile with the current date.If the timpestamp in the log file is less than 4 hours then i need to read the file from that location.Below is the file format.Please... (1 Reply)
Discussion started by: achu
1 Replies
10. Shell Programming and Scripting
Hi,
could anyone help me out how to write a script, to grep the two timestamp from a particular file, so that it will list out all the logs between the particular timestamp
I have a pattern of log:
servicename operationname starttime endtime
eg.,
servicename1 operationname1 01:11:11... (1 Reply)
Discussion started by: jacktolearn
1 Replies