Assuming each line format is the same, you might use this:
PS: use nawk instead of awk if you happen to run Solaris.
Hey that is going to work i think, but its actually referencing TTsendQ which is the field before TTMT , how do i move that to TTMT? is it by altering ttmt=$125 to 127 for example?
I changed ttmt to ttmt=$127 and it worked perfect, is just showing the few ttmt above 20 now, many thanks jlliagre, your a star!
P.S using Suse Linux rather than Solaris, but this is more than enough, thanks again
Last edited by 1905; 11-20-2010 at 09:43 PM..
Reason: +got it working!! thanks
I need to grep out usernames with UID's greater than 200 out of the /etc/passwd file for a server migration. It is the third field however I am not sure to to accomplish this. I tried to search the forums but did not seem to find an answer (might have over looked it). Any help would be... (2 Replies)
Sorry for such a basic question, but I have spent hours trying to work this out! I need an awk command (or similar) that will look at a text file and output to the screen if the 4th column of each line has a value greater than or equal to x.
data.txt
This is the 1 line
This is the 2 line
This... (6 Replies)
Hi, is there any way in grep to grep for a certain number of characters? For example I have a list of customerIDs, I want to grep for all greater than 12 characters? (2 Replies)
Hi
I am not able to grep a message in a log file -
For ex - Notice < > "Server1" is in deploying state under "Stut" domain
When i use gzcat logfile | grep -i " Notice < > "Server1" is in deploying state under "Stut" domain"
It is not returning any value.
Is it because of "Server1"... (1 Reply)
Hey guys, I'm fairly new at unix shell scripting and I have a quick question.
Quick overview I devolped a script where I generate a file ..and I want to grep any time greater than 30 minutes.
What i do is runa command to generates the below and puts it into a file:
I run
./ggsci << endit... (4 Replies)
Hi,
I have a dynamically growing ascii file which has large data (both text and digits). I need to grep those lines having value greater than '123'. These numeric values may appear at anywhere in the line, hence I could not use awk to split to columns.
So, please help me with the grep regular... (12 Replies)
I'm trying to grep lines where the digits at the end of each line are greater than digits. Tried this but it will only allow me to specify 2 digits. Any ideas would greatly be appreciated. grep -i '\<\{3,4,5\}\>' file
---------- Post updated at 05:58 PM ---------- Previous update was at 05:41... (1 Reply)
data.txt
August 09 17:16 2013
August 09 17:17 2013
August 09 17:19 2013
August 09 17:20 2013
August 09 17:21 2013
August 09 17:22 2013
August 09 17:23 2013
August 09 17:24 2013
to print from a point in this file, to the end of the file, i type:
awk '/August 09 17:22/,0' data.txt.
... (1 Reply)
Hi, This is my first post.
I have a korn shell script which outputs a select statment to a file. There is only one column and one row which contains a record count of the select statement.
The select statement looks something like this:
SELECT COUNT(some_field) AS "count_value"
... (2 Replies)
Looking for help.
I need help in the grep ( alternative) to filter out the a keyword from the logfile for a time period of sysdate -1.
My logfile looks like:
####<Sep 7, 2014 3:46:55 PM PDT> <Warning> <Management> <hostname> <> < ExecuteThread:
####<Sep 15, 2014 2:51:05 AM PDT>... (1 Reply)
Discussion started by: jjoy
1 Replies
LEARN ABOUT MOJAVE
logsave
LOGSAVE(8) System Manager's Manual LOGSAVE(8)NAME
logsave - save the output of a command in a logfile
SYNOPSIS
logsave [ -asv ] logfile cmd_prog [ ... ]
DESCRIPTION
The logsave program will execute cmd_prog with the specified argument(s), and save a copy of its output to logfile. If the containing
directory for logfile does not exist, logsave will accumulate the output in memory until it can be written out. A copy of the output will
also be written to standard output.
If cmd_prog is a single hyphen ('-'), then instead of executing a program, logsave will take its input from standard input and save it in
logfile
logsave is useful for saving the output of initial boot scripts until the /var partition is mounted, so the output can be written to
/var/log.
OPTIONS -a This option will cause the output to be appended to logfile, instead of replacing its current contents.
-s This option will cause logsave to skip writing to the log file text which is bracketed with a control-A (ASCII 001 or Start of
Header) and control-B (ASCII 002 or Start of Text). This allows progress bar information to be visible to the user on the console,
while not being written to the log file.
-v This option will make logsave to be more verbose in its output to the user.
AUTHOR
Theodore Ts'o (tytso@mit.edu)
SEE ALSO fsck(8)E2fsprogs version 1.44.1 March 2018 LOGSAVE(8)