Yes indeed, I have checked all posts before replying back and clearly mentioned that none of the <scripts> worked because I tried all of them. The previous post had just one of the example as don't want to bump over with all outcomes as they all produced the same outcome.
Intention here is to resolve the issue to get experts advise to get issue resolved as pulling data with dates are extremely difficult due to presence of >=2 date formats in log file.
Below script result into invalid date
Last edited by Don Cragun; 03-14-2019 at 04:56 PM..
Reason: Add CODE tags again.
I have a task where I need to code a shell script to extract a 10 min range (10 min from now until now) extract of a log file.
I taught I could simply use a command that would say something like Start=date - 10 min but I didn't find anything. Looks like the only solution would have to code a... (3 Replies)
All I want is to look for the pattern in the file...If I found it at # places... I want print lines after those pattern(line) until I find a blank line.
Log EXAMPLE :
MT:Exception caught
The following Numbers were affected:
1234
2345
2346
Error
java.lang.InternalError:... (3 Replies)
hey guys,
I tried searching but most 'search and replace' questions are related to one liners.
Say I have a file to be replaced that has the following:
$ cat testing.txt
TESTING
AAA
BBB
CCC
DDD
EEE
FFF
GGG
HHH
ENDTESTING
This is the input file: (3 Replies)
A log files has lines (1 line per each log for a majority; a few for 2 lines per each log)
May 31 14:00:11 rtprodapp1 local2:notice sudo: jdoe : TTY=pts/0 ; PWD=/home/jdoe ; USER=root ; COMMAND=/usr/bin/su -
May 31 14:03:19 rtprodapp1 local2:notice sudo: jdoe : TTY=pts/0 ; PWD=/home/jdoe ;... (4 Replies)
i want to search a log for a string. when that string is found, i want to grab the a set number of lines that came before the string, and a set number of lines that come after the string.
so if i search for the word "Error" in the /var/log/messages file, how can I output the 20 lines that came... (4 Replies)
I have a "main" file which has blocks of data for each user defined by tags BEGIN and END.
BEGIN
ID_NUM:24879
USER:abc123
HOW:47M
CMD1:xyz1
CMD2:arp2
STATE:active
PROCESS:id60
END
BEGIN
ID_NUM:24880
USER:def123
HOW:4M
CMD1:xyz1
CMD2:xyz2
STATE:running
PROCESS:id64
END (7 Replies)
I need to use awk for this task !
input (fields are separated by ";"):
1%2%3%4%;AA
5%6%7%8%9;AA
1%2%3%4%5%6;BB
7%8%9%10%11%12;BBIn the 1st field there are patterns composed of numbers separated by "%".
The 2nd field define groups (here two different groups called "AA" and "BB").
Records... (8 Replies)
I have a file with two ID columns followed by five columns of counts in fraction form. I'd like to print lines that have a count of at least 4 (so at least 4 in the numerator, e.g. 4/17) in at least one of the five columns.
Input file:
comp51820_c1_seq1 693 0/29 0/50 0/69 0/36 0/31... (6 Replies)
Need Assistance in shell programming... I have a huge file which has multiple stations and i wanted to search particular station and extract few lines from it and the rest is not needed
Bold letters are the stations . The whole file has multiple stations .
Below example i wanted to search... (4 Replies)
Discussion started by: ajayram_arya
4 Replies
LEARN ABOUT HPUX
leave
leave(1) General Commands Manual leave(1)NAME
leave - remind you when you have to leave
SYNOPSIS
[hhmm]
DESCRIPTION
The command waits until the specified time, then reminds you to leave. You are reminded 5 minutes and 1 minute before the actual time, at
the time, and every minute thereafter. When you log off, exits.
The time of day is in the form hhmm, where hh is a time in hours (which can range from 0 through 11 or 0 through 24 hours), and mm is the
number of minutes after the specified hour. If the value of hh is greater than 11 (24-hour clock time), the specified value is reduced by
12 to a new value in the range of 0 through 11, thus ensuring that the alarm time is always set to activate within the next 12 hours. For
example, if hhmm is 1350 and the current time is 4:00 PM (1600), the 1350 value is changed to 150 and the alarm is set for 1:50 AM, nine
hours and 50 minutes later. On the other hand, if it is 9:00 AM and hhmm is specified as 2200 (10:00 PM), the value used is converted to
1000 and the alarm is set for one hour later instead of 13 hours as specified.
If no argument is provided, prompts with
A reply of newline causes to exit; otherwise the reply is assumed to be a time. This form is suitable for inclusion in a or file.
The command ignores interrupts, quits, and terminate signals. To get rid of it you should either log off or use giving its process ID.
EXAMPLES
The command
sends an alarm (a beep) to your terminal to remind you that you have to leave at 12:04 and reminds you that you are late at one minute
intervals after 12:04.
WARNINGS
The command checks to see if a user has logged out by checking the file every 100 seconds. If a user logs out and logs back in to the same
tty before makes its periodic check, may not know that the user has logged out.
AUTHOR
was developed by the University of California, Berkeley.
FILES SEE ALSO calendar(1).
leave(1)