Search Results

Search: Posts Made By: rpm120
2,777
Posted By rpm120
Input akshay@nio:/tmp$ cat file 2014/10/09 ...
Input
akshay@nio:/tmp$ cat file
2014/10/09 CDE876172588765 00:09:45 00:10:10 200 200 11.7093
2014/10/09 CDE366134588757 01:04:34 01:04:54 210 210 9.8898...
2,777
Posted By rpm120
Find the timestamp difference between two different colums in a file
Sample Input File

2014/10/09 CDE876172588765 00:09:45 00:10:10 200 200 11.7093
2014/10/09 CDE366134588757 01:04:34 01:04:54 210 210 9.8898
2014/10/09 ...
1,993
Posted By rpm120
Get the first occurence between two patterns
I have an output file which gives me the timely status of a server.

Sample file:


March 11 2014

21:10, 1, 2, 3, 4, 5, 6, 7, 8, 9, x, y, z...
21:05, ...
Forum: AIX 02-17-2014
5,475
Posted By rpm120
Thanks bakunin! Unfortunately I dont have...
Thanks bakunin!

Unfortunately I dont have admin access for that machine.
Forum: AIX 02-16-2014
5,475
Posted By rpm120
Mail command to send attachements
I tried the below command

uuencode data.txt | mailx -s “Test Mail” “mrp@xyz.com”

But I get the below error

ksh: uuencode: not found.
Null Message body; hope that' ok

which clearly tell...
Forum: AIX 02-13-2014
34,653
Posted By rpm120
Thanks a lot bakunin! The doubt I have is...
Thanks a lot bakunin!

The doubt I have is in the results of the commands output.

For Instance,

Let's take the "User%" from the output of the topas command and compare it with
"us" in...
Forum: AIX 02-11-2014
34,653
Posted By rpm120
Can you please help me to match these two...
Can you please help me to match these two outputs?

Theses were captured one after other

topas command o/p (Only CPU)

CPU User% Kern% Wait% Idle% Physc Entc
ALL 3.1 4.9 ...
Forum: AIX 02-10-2014
34,653
Posted By rpm120
To get only the cpu info from the topas command terminal
To get only the cpu info from the topas command terminal.

CPU User% Kern% Wait% Idle% Physc Entc
ALL 2.3 4.4 0.0 93.3 0.07 7.7

I tried some thing like this...
Forum: AIX 01-29-2014
5,306
Posted By rpm120
Need to grep two lines from the topas command through a Korn Script
I need to grep two lines from topas command in one of my AIX server.


Topas Monitor for host: semas001 EVENTS/QUEUES FILE/TTY
Wed Jan 29 10:12:06 2014 Interval: 2 ...
Forum: AIX 10-27-2013
3,448
Posted By rpm120
Need to get the next day's date of the user entered date
I need to get the next day's date of the user entered date

for example:
Enter date (yyyy/mm/yy):
2013/10/08I need to get the next day's date of the user entered date

Desired Output:
...
4,403
Posted By rpm120
Regrets for not giving proper input...:( ...
Regrets for not giving proper input...:(

Desired output should have the highlighted contents in the log


2013/06/11 14:29:04 <0999> (725102) Processing batch 02_1231324
2013/06/11...
4,403
Posted By rpm120
Multiple pattern match and print the output in a single line
I need to match two patterns in a log file and need to get the next line of the one of the pattern (out of two patterns) that is matched,
finally need to print these three values in a single line....
2,626
Posted By rpm120
Additional to the above info about the log, the...
Additional to the above info about the log, the given above log has 9 lines and these 9 lines are the unique lines, In real time my original log will have this 9 lines or this block repeated n times...
2,626
Posted By rpm120
Following are the actual lines from the script: ...
Following are the actual lines from the script:

#!/bin/ksh

fname=$1

for batchname in $(grep -i "Processing batch" $fname | cut -d "'" -f2)
do
Batch_state=`grep -c -i "Batch '$batchname'...
2,626
Posted By rpm120
Reusing a variable in a script
I was breaking my head for a day still not successful


I have variable x for following is assigned

x=awk '/[0-9]_[0-9].*successful/{getline;getline;getline;print}' log filename | awk...
2,147
Posted By rpm120
worked perfectly...:)
worked perfectly...:)
2,147
Posted By rpm120
Here is the log with more lines 012/01/21...
Here is the log with more lines


012/01/21 10:29:02 (111111) Processing Job '23_369468343464564'
2012/01/21 10:29:02 (111111)
Making Job '23_369468343464564.0'...
2012/01/21...
2,147
Posted By rpm120
Thanks for your solution. As of my...
Thanks for your solution.

As of my understanding you code matches the specific pattern and gets the required line. This works perfectly when these pattern appear constantly every time in the log....
2,147
Posted By rpm120
Desired Output: 012/01/21 10:29:02 (111111)...
Desired Output:

012/01/21 10:29:02 (111111) Processing Job '23_369468343464564'

Job has 123 Docs 234 Pgs 456 Lines 4 Errors


I want to match the entire line (i.e Jobnumber...
2,147
Posted By rpm120
ksh : need to get the 4 th line above and 2 nd below the matched pattern in the log file
I have a log file as given below

012/01/21 10:29:02 (111111) Processing Job '23_369468343464564'
2012/01/21 10:29:02 (111111)
Making Job '23_369468343464564.0'...
2012/01/21...
3,950
Posted By rpm120
Great Thanks for your time, comments and...
Great Thanks for your time, comments and solution...!!! :)
3,950
Posted By rpm120
This is how I could take it forward ...
This is how I could take it forward


#!/bin/ksh
printf "Enter the date (YYYY/MM/DD): "
read dd
awk -F '[ :]' -v dd="$dd" '
BEGIN { fmt = "Batches that were successful on %s between...
3,950
Posted By rpm120
need to get the sum of the successful batches at the last
Thanks again...:)

I do not have any specific reason to go with that solution (awk -v rd="2013/03/07" -v st="00:00:00" -v et="00:29:59" '$1==rd && $2>=st && $2<=et' log | grep -c "successful"), I...
3,950
Posted By rpm120
Great thanks for your explanation.:) I was...
Great thanks for your explanation.:)

I was trying out this piece of code below


awk -v rd="2013/03/07" -v st="00:00:00" -v et="00:29:59" '$1==rd && $2>=st && $2<=et' log | grep -c...
3,950
Posted By rpm120
Thanks a lot for your solution....:) Regrets for...
Thanks a lot for your solution....:) Regrets for the typo...:(

can you please explain the code such that it will be helpful for me to build on this... for example if I want to match some...
Showing results 1 to 25 of 26

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