Search Results

Search: Posts Made By: sarah-alikhan31
8,106
Posted By sarah-alikhan31
Thank you Yoda & pravin27 Yoda, Your...
Thank you Yoda & pravin27

Yoda,

Your guidance helped....The change I made to the scriptlet was that
I omitted '$' sign from dt_1 and d2_2 calculation...and it worked.
Perhaps if you could...
8,106
Posted By sarah-alikhan31
I think the problem lies with the calculation of...
I think the problem lies with the calculation of $dt_1 and $dt_3
dt_1=`date +%h" "%d", "%Y\ %l -d "1 hour ago"`

dt_3=`date +%h" "%d", "%Y\ %l`
The space between Y and l, is the culprit :(
I...
8,106
Posted By sarah-alikhan31
The entire script given in my first post, when I...
The entire script given in my first post, when I execute it...(with this updated awk statement) , simply echoes the date patterns.

'dump_logs.txt' file is of 0 bytes, after executing the script .
8,106
Posted By sarah-alikhan31
awk -v a="{$dt_1}" -v b="{$dt_2}" -v c="{$dt_3}"...
awk -v a="{$dt_1}" -v b="{$dt_2}" -v c="{$dt_3}" -v d="{$dt_4}" '$0~ (a ":[0-9][0-9]:[0-9][0-9] "b){flag=1;next} $0~ (c ":[0-9][0-9]:[0-9][0-9] "d){flag=0} flag' /some/logfile >> /some/dump_logs.txt...
8,106
Posted By sarah-alikhan31
To print lines between 2 timestamps using awk|sed and regex
Hi,

I am using the following code to fetch lines that are generated in last 1 hr . Hence, I am using date function to calculate -last 1 hr & the current hr and then somehow use awk (or sed-if...
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 07:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy