Search Results

Search: Posts Made By: avinthm
1,359
Posted By avinthm
Sorry, I didn't get you. Did you mean you have...
Sorry, I didn't get you.
Did you mean you have done it? Please let me know how!
1,382
Posted By avinthm
I have read in articles that top command returns...
I have read in articles that top command returns accurate command after executed few times. Hence we want to execute top command 10 times and then capture the data.

I dont want to send the 10...
1,359
Posted By avinthm
Filter top -bc -n10 output
I have posted a thread in Unix for Dummies question......

https://www.unix.com/unix-dummies-questions-answers/223769-filter-top-bc-n10-output.html

Can anybody help me out with this please?
...
1,382
Posted By avinthm
Filter top -bc -n10 output
Hi

"top -bc -n10" gives me the output of the "top" command 10 times.

Now i dont want repeated results and hence want to return only the last output.

And I would like to do it in one command...
65,365
Posted By avinthm
2> /dev/null Thanks a lot, that did my job
2> /dev/null
Thanks a lot, that did my job
65,365
Posted By avinthm
set echo off and on
Hi
I have written a bash script to capture the output of jmap.
The command i execute is jmap -heap <pid>
This gives details of memory usage of the process with <pid>.
Now jmap not only gives...
3,330
Posted By avinthm
If my timestamp="11:16:14" then sed -ne...
If my timestamp="11:16:14" then
sed -ne '/'"$timestamp"'/,$p' $logFile
works fine

And if timestamp="2011/06/28 11:16:14" then nothing works.
Any reasons?

---------- Post updated at 12:35...
3,330
Posted By avinthm
nope, it doesn't work. I am really not...
nope, it doesn't work. I am really not understanding the usage of single and double quotes.
Can you please provide some pointers to read up?
3,330
Posted By avinthm
I am trying use a variable for timestamp like ...
I am trying use a variable for timestamp like
sed -ne '/$timestamp/,$p' yourfile | while read line
And sed is not matching any records. I tried '$timestamp', "$timestamp"....nothing seems to be...
3,330
Posted By avinthm
Ok here is my code while read line do...
Ok here is my code
while read line
do
processLine
done < $logFile

Now where and how does your statement fit here?

---------- Post updated at 05:49 PM...
16,609
Posted By avinthm
Thats working. Not sure what mistake was i doing....
Thats working. Not sure what mistake was i doing.
Anyway, thanks a lot.
3,330
Posted By avinthm
you mean, p will have the rest of the file and i...
you mean, p will have the rest of the file and i read it line by line?
3,330
Posted By avinthm
Reading a file after nth line
I know how to read a file line by line. But don't to how to skip to a line matching a criteria and then continue reading it till the end.

This is a log file. The input is a timestamp.
1. Find...
16,609
Posted By avinthm
[QUOTE=michaelrozar17;302542960]It does work for...
[QUOTE=michaelrozar17;302542960]It does work for me in GNU Sed. What sed you have..?
my sed version is GNU sed version 4.1.5
16,609
Posted By avinthm
I output is same as input "john 2011/06/28...
I output is same as input "john 2011/06/28 11:16:14"
16,609
Posted By avinthm
Thanks yazu and michael for your inputs. But it...
Thanks yazu and michael for your inputs.
But it didn't work.

michael, as per your suggestion, if i dont have stored a pattern in a variable, then how to I search?
I will explain my problem
1. I...
16,609
Posted By avinthm
I have tried almost all sorts of combinations,...
I have tried almost all sorts of combinations, none of them have worked. Even this one didn't work.
I want to understand what's happening behind the scene.
16,609
Posted By avinthm
sed: -e expression #1, char 21: unterminated `s' command
I have read many threads, but I still didn't find the right answer. May be i didn't find the right thread, though are so many threads for the same question.

Basically the situation is - find date...
Showing results 1 to 18 of 18

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