Search Results

Search: Posts Made By: finn
4
awk
1,856
Posted By finn
Good idea thanks, I noticed when opening the...
Good idea thanks, I noticed when opening the resultant output file in Excel it didnt auto format the time correctly and the column need a custom format doing. Doing your suggestion will mean that is...
4
awk
1,856
Posted By finn
Spot on many thanks Ravinder!
Spot on many thanks Ravinder!
4
awk
1,856
Posted By finn
awk - read only part of a field
I have an awk command which reads a file and counts the frequency of each "date/time" column and outputs the results to a log


# if field7 is "input_message" in the input log
# count frequency...
3,907
Posted By finn
Thanks all - some great solutions there that...
Thanks all - some great solutions there that work. That AWK is a really powerful tool.
3,907
Posted By finn
Grep patterns and group counts
Hi,

I have a continuous log file which has the following format:-

02/Sep/2015: IP 11.151.108.166 error occurred etc
03/Sep/2015: IP 11.151.108.188 error occurred etc
03/Sep/2015: IP...
1,828
Posted By finn
At jobs - created date and time
Hi,

I'm running atq for a user and its showing 2 'at' jobs in the queue to start at a later time.

> atq
Is there any way i can find out the creation date/time of these jobs?

and ideally...
2,530
Posted By finn
Thanks all - much easier than i thought! Cheers
Thanks all - much easier than i thought!
Cheers
2,530
Posted By finn
Find file by filename or with newest modified date
Hi,

I have a directory that has numerous files in it, and there is two which are named "filerec_ddmmyyHH24MMSS" by the time they are created so "filerec_010615012250" was created at 01:22:50 on...
6,333
Posted By finn
Many thanks Aia, i'll give that a try... There...
Many thanks Aia, i'll give that a try...
There are other statements in the log e.g. "The job xx has done xwy" or "The job xx is doing xyz" so i need to look for those particular patterns with the...
6,333
Posted By finn
#!/usr/bin/ksh # count the jobs in log and...
#!/usr/bin/ksh

# count the jobs in log and echo the result
job_count=`grep -e "The job called .* has finished | The job called .* is running" logfile.txt | wc -l`
echo $job_count

it doesnt do...
6,333
Posted By finn
logfile.txt contains: The job called ECHO...
logfile.txt contains:

The job called ECHO has finished
The job called VHS is running
The job called DELTA has finished
...etc...

when i do:-
job_count=`grep -e "The job called .* has...
6,333
Posted By finn
Grep multiple patterns that contain wildcards
job_count=`grep -e "The job called .* has finished | The job called .* is running" logfile.txt | wc -l`

Any idea how to count those 2 patterns so i have a total count of the finished and running...
Showing results 1 to 12 of 12

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