Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Need to filter the result set within 2 time frame Post 303017961 by gotamp on Friday 25th of May 2018 01:32:28 PM
Old 05-25-2018
Question Need to filter the result set within 2 time frame

my sample file is like this
Code:
$cat onefile
05/21/18 13:10:07        ABRT US1CPDAY Status 1
05/21/18 21:18:54        ABRT DailyBackup_VFFPRDAPENTL01 Status 6
05/21/18 21:26:24        ABRT DailyBackup_VFFPRDAPENTL02 Status 6
05/21/18 21:57:36        ABRT DailyBackup_vm-ea1ffpreng01 Status 6
05/22/18 13:11:56        ABRT US1CPDAY Status 1
05/22/18 22:05:00        ABRT US1EXNITE Status 1
05/23/18 13:11:24        ABRT US1CPDAY Status 1
05/24/18 13:12:29        ABRT US1CPDAY Status 1
05/24/18 23:23:49        ABRT DailyBackup_IAM-FF-SMTP Status 156

i want to grep the lines between 05/22/18 to 05/23/18

I tried with sed
Code:
sed -n '/$first/,/$last/p' onefile

but it does not work.

I tried with grep -e
Code:
grep -e "05/22/18" -e "05/23/18"

it too did not work complaining about illegal option -e


PLease help !!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

search string during a specific time frame

Can someone please help me with searching a string during a specific time frame. Below is the format of the time from my log file. "GET /AAM2009_wherewereheaded.wmv HTTP/1.1" 200 52307085 The search string I need is "AAM2009_wherewereheaded.wmv" I need to search the number of... (1 Reply)
Discussion started by: tadi18
1 Replies

2. Shell Programming and Scripting

Filter the column and print the result based on condition

Hi all This is my output of the some SQL Query TABLESPACE_NAME FILE_NAME TOTALSPACE FREESPACE USEDSPACE Free ------------------------- ------------------------------------------------------- ---------- --------- ---------... (2 Replies)
Discussion started by: jhon
2 Replies

3. Shell Programming and Scripting

Shell Script to delete files within a particular time frame under multiple sub folders

Greetings! I'm looking for starting information for a shell script. Here's my scenario: I have multiple folders(100) for example: /www/test/applications/app1/logs /www/test/applications/app2/logs Within these folders there are log files files that need to be deleted after a month. ... (3 Replies)
Discussion started by: whysolucky
3 Replies

4. Shell Programming and Scripting

Search for text between two time frame using sed

I have log files with time stamps. I want to search for text between two time stamp using sed even if the first tme stamp or the last time stamp are not present. For e.g. if i search between 9:30 and 9:40 then it should return text even if 9:30 or 9:40 is not there but between 9:30 and 9:40 is... (8 Replies)
Discussion started by: Azher
8 Replies

5. Shell Programming and Scripting

awk : Search for text between two time frame (12 hours)

I have created the script to grep the errors from weblogic logs files and redirecting output to file.txt ...From file.txt I'm using awk command to collect the past 20 mins output...The script running from cron every 15 mins... The script working well... Now the challenges, I'm trying to use... (27 Replies)
Discussion started by: zenkarthi
27 Replies

6. Shell Programming and Scripting

awk : collecting all data between two time frame

Hi Experts , I need your help to collect the complete data between two time frame from the log files, when I try awk it's collecting the data only which is printed with time stamp for example, awk works well from "16:00 to 17:30" but its not collecting <line*> "from 17:30 to 18:00" ... (8 Replies)
Discussion started by: zenkarthi
8 Replies

7. Shell Programming and Scripting

Help with filter result that fulfill criteria

Input file: ##fileformat=tab ##reference=file:input.txt #Line Position Score Input_185827_2127 1071 67 Input_18213_21 1021 100 Input_9012_214 200 150 Input_935_217 124 70 Output file: ##fileformat=tab ##reference=file:input.txt #Line Position Score Input_18213_21 1021... (2 Replies)
Discussion started by: perl_beginner
2 Replies

8. UNIX for Dummies Questions & Answers

UNIX Account getting Locked Everyday between same Time Frame

I am facing an Issue with a particular Unix Account ( ie a particular Userid) getting LOCKED everyday between 7:30am and 8:00am. The Password associated with this particular Account has been setup such that it should never Expire at all but it does LOCK the Account after more than 3 failed... (5 Replies)
Discussion started by: pchegoor
5 Replies

9. Shell Programming and Scripting

Help on script to capture info on log file for a particular time frame

Hi I have a system running uname -a Linux cmovel-db01 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux I would like to capture the contents of /var/log/syslog from 11:00AM to 11:30AM and sent to this info via email. I was thinking in set a cron entry at that... (2 Replies)
Discussion started by: fretagi
2 Replies

10. Shell Programming and Scripting

Help with filter result (scientific notation) by using awk

Input file: data1 0.05 data2 1e-14 data1 1e-330 data2 1e-14 data5 2e-60 data5 2e-150 data1 4e-9 Desired output: data2 1e-14 data1 1e-330 data2 1e-14 data5 2e-60 data5 2e-150 I would like to filter out those result that column 2 is less than 1e-10. Command try: (1 Reply)
Discussion started by: cpp_beginner
1 Replies
ABRT-RETRACE-CLIEN(1)						    ABRT Manual 					     ABRT-RETRACE-CLIEN(1)

NAME
abrt-retrace-client - Handles the communication with Retrace server. SYNOPSIS
abrt-retrace-client <operation> [options] DESCRIPTION
This tool is able to communicate with Retrace server: create a new task, ask about task's status, download log or backtrace of a finished task. Integration with libreport events abrt-retrace-client can be used as an analyzer for application crashes which dump core. Example usage in report_event.conf: EVENT=analyze analyzer=CCpp abrt-retrace-client OPERATIONS
create Creates a new task. Prints task ID and password to stdout. Either -d or -c is required. status Prints task's status to stdout. Both -t and -p are required. log Prints finished task's log to stdout. Both -t and -p are required. backtrace Print finished task's backtrace to stdout. Both -t and -p are required. batch Runs all operations in one step: creates a new task, periodically asks for status (the period is specified by --status-delay option) and downloads the result when finished. If the task was successful backtrace file is saved, otherwise log is printed to stdout. Either -c or -d is required. OPTIONS
-v, --verbose be verbose -s, --syslog log to syslog -k, --insecure allow insecure connection to retrace server --url URL retrace server URL --headers (debug) show received HTTP headers -d, --dir DIR read data from ABRT problem directory -c, --core COREDUMP read data from coredump -l, --status-delay delay for polling operations (seconds) --no-unlink (debug) do not delete temporary archive created in /tmp -t, --task ID ID of the task on server -p, --password PWD password of the task on server AUTHORS
o ABRT team abrt 2.1.11 06/18/2014 ABRT-RETRACE-CLIEN(1)
All times are GMT -4. The time now is 09:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy