I'm completely lost here. The date command you used in your awk script:
will give you something like:
which doesn't look anything at all like the:
you said you wanted to match. And, you never specified what that string represents in relation to the current time. If you're trying to print every line in your log file starting with the 1st line that matches the current hour of the current day, that would be something like:
or (since there are no slash characters in the date format you're trying to match which bakunin warned you about):
Note that if the day in the timestamps in your log file has a leading space instead of a leading 0 for the 1st nine days of a month, you'll need to change the %d in the date command format string to %e.
Last edited by Don Cragun; 08-14-2014 at 02:58 PM..
Reason: fix doubled single quote
Hi
I am trying to fetch the rows with match string "0000001234"
Input file looks like below:
09 0 XXX 0000001234 Z 1
09 0 XXX 0000001234 Z 1
09 0 XXX 0000001234 Z 1
09 0 XXX 0000001234 Z 1
09 0 XXX 0000001234 Z 1... (6 Replies)
Hi, I need to grep a pattern and fetch subsequent lines till end of the data-set.
E.g., i have a file like:
AA 1111 23 34
BB 45 56 78
CC 22 44
AA 2222 78 34 56
BB 22 56 67 68 23
CC 56 78
DD 33 55 77
AA 3333 46
BB 58 79
In above file i have 3-data sets where each set starts with... (6 Replies)
Hi
i have a file which have a pattern like this
Nov 10 session closed
Nov 10 Nov 9 08:14:27 EST5EDT 2010 on tty .
Nov 10 Oct 19 02:14:21 EST5EDT 2010 on pts/tk .
Nov 10 afrtetryytr
Nov 10 session closed
Nov 10 Nov 10 03:21:04 EST5EDT 2010
Dec 8 Nov 10 05:03:02 EST5EDT 2010
... (13 Replies)
Hello, can someone help me how to find a word and 2 lines after it and then send the output to another file.
For example, here is myfile1.txt. I want to search for "Error" and 2 lines below it and send it to myfile2.txt
I tried with grep -A but it's not supported on my system.
I tried with awk,... (4 Replies)
Hi all,
I have ot match sentence list and word list anf fetch similar words in a separate file
second file with 2 columns
So I want the output shuld be 2 columns like this (3 Replies)
Hi all,
I have 7 words
Now I have 1 file which contain data in large number of rows and columns
and 6th column contain any of these words or may be more than one words among above 7 words:
I want
script should search for the above mentioned 7 words in the 6th column
... (9 Replies)
Hi all,
I have 2 files
one file contain data like this in one column
AST3
GSTY4
JST3
second file containign data like this in 2 columns
AST3(PAXXX),GSTY4(PAXXY) it is used in diabetes
KST4 it is used in blood... (6 Replies)
Hi Solved these kind of issues using these codes But these are not wrking for my attached files can anybody check........
awk 'NR==FNR{X++;next}{if(X){print}}' file1 file2
awk 'NR==FNR{X=$0;next}{n=split($1,P," ");sub($1,"",$0);for(i=1;i<=n;i++){if(X]){print P,$0}}}' file1 FS="\t" file2
... (6 Replies)
Hi all
I have 2 files:
first file
AABC
TTYP
JKBH
CVBN
NHJK
KJHM
Second file is
AABC,XCYU,JUHD Alllele1 GACXT It is approved study
TTYP,JKBH Allele2 PPRD It is clinical trial study
JKBH Allele2 PPRD ... (5 Replies)
Hi All,
My source file contains special characters(Latin characters).I need to fetch only the lines which contains the special characters. The problem is i don't know which all latin/special characters can come in the source.
Is there anyway to extract the lines which contain letters other... (3 Replies)
Discussion started by: joe!!
3 Replies
LEARN ABOUT NETBSD
fuibyte
FETCH(9) BSD Kernel Developer's Manual FETCH(9)NAME
fetch, fubyte, fuibyte, fusword, fuswintr, fuword, fuiword -- fetch data from user-space
SYNOPSIS
#include <sys/types.h>
#include <sys/systm.h>
int
fubyte(const void *base);
int
fusword(const void *base);
int
fuswintr(const void *base);
long
fuword(const void *base);
DESCRIPTION
The fetch functions are designed to copy small amounts of data from user-space.
The fetch routines provide the following functionality:
fubyte() Fetches a byte of data from the user-space address base.
fusword() Fetches a short word of data from the user-space address base.
fuswintr() Fetches a short word of data from the user-space address base. This function is safe to call during an interrupt context.
fuword() Fetches a word of data from the user-space address base.
RETURN VALUES
The fetch functions return the data fetched or -1 on failure. Note that these functions all do "unsigned" access, and therefore will never
sign extend byte or short values. This prevents ambiguity with the error return value for all functions except fuword().
SEE ALSO copy(9), store(9)BUGS
The function fuword() has no way to unambiguously signal an error, because the data it reads might legitimately be the same as the -1 used to
indicate an error. The other functions do not have this problem because the unsigned values returned by those can never match the -1 error
return value.
BSD January 7, 1996 BSD