I have a file ("modtest") in which I want to update the last date/time block in the lines beginning with a period. Here is a sample:
These lines have anywhere from 2 to 5 fields. The date/time block I want to update will either be the last or next-to-last field in the line.
The dateblock variable is mmddyy, two digits for hour, and EST or EDT.
When I run this command, the lines that have 5 fields and begin with a period are changed as follows, but the 4th field that I meant to update does not appear at all:
I have tried various things with sub and gsub, including a less-specific regular expression, and that didn't work either. I'm very new to awk, so trying to figure this out has been a good learning experience, but I'm hoping to "cut to the chase" now... Any help appreciated. Thanks!
Last edited by zaxxon; 10-23-2009 at 10:44 AM..
Reason: code tags also for data and logs please, ty.
Hi all
I want to do a simple substitution in awk but I am getting unexpected output. My function accepts a time and then prints out a validation message if the time is valid. However some times may include a : and i want to strip this out if it exists before i get to the validation. I have shown... (4 Replies)
Hello,
I read and search through this wonderful forum and tried different approaches but it seems I lack some knowledge and neurones ^^
Here is what I'm trying to achieve :
file1:
test filea 3495;
test fileb 4578;
test filec 7689;
test filey 9978;
test filez 12300;
file2:
test filea... (11 Replies)
Hello
does anyone know of an awk that will extract log file entries between a specific date and time range, eg:
awk '/15\/Dec\/2010:16:10:00/, /15\/Dec\/2010:16:15:00/' access_log
but one that works?
Or a free command line log file analysis tool/script?
I'd like to be able to view... (2 Replies)
Looking for some help and usually when I do a search this site comes up. Hopefully someone can give me a little direction as to how to use one of these two commands to achieve what I'm trying to do.
What am I trying to do?
I need to take the time value in epoch format returned from the... (5 Replies)
hey guys.
the following line is a line taken from apache's access_log
10.10.10.10 - jdoe "GET /images/down.gif HTTP/1.1" 304
I'm concerned about the field that has the date and time in it.
if assuming the delimiter in the file is a space, then the fourth field will always have the date... (5 Replies)
I'd like to convert a date string in the form of sun aug 19 09:03:10 EDT 2012, to unixtime timestamp using awk.
I tried
This is how each line of the file looks like, different date and time in this format
Sun Aug 19 08:33:45 EDT 2012, user1(108.6.217.236) all: test on the 17th
... (2 Replies)
Hi, I want to print the first column with original value and without any double quotes
The output should look like
<original column>|<column without quotes>
$ cat a.txt
"20121023","19301229712","100397"
"20121023","19361629712","100778"
"20121030A","19361630412","100838"... (3 Replies)
hi
i want to validate the date and time in filename
filename : mohan.moh.ccyymmdd.ccyymmdd.hhmmss.txt
mohan_moh.20151222.20151222.122442.txt
i want code that check that date given in filename 20151222 in this format ccyymmdd else it mark file is not valid used in my OS detail is AIX 6... (12 Replies)
Discussion started by: MOHANP12
12 Replies
LEARN ABOUT DEBIAN
gr_plot_char
GR_PLOT_CHAR(1) User Commands GR_PLOT_CHAR(1)NAME
gr_plot_char - plot samples versus time for byte/char data
SYNOPSIS
gr_plot_char: [options] input_filenames
DESCRIPTION
Takes a GNU Radio byte/char binary file and displays the samples versus time. You can set the block size to specify how many points to
read in at a time and the start position in the file. By default, the system assumes a sample rate of 1, so in time, each sample is plotted
versus the sample number. To set a true time axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the
samples.
OPTIONS -h, --help
show this help message and exit
-B BLOCK, --block=BLOCK
Specify the block size [default=1000]
-s START, --start=START
Specify where to start in the file [default=0]
-R SAMPLE_RATE, --sample-rate=SAMPLE_RATE
Set the sampler rate of the data [default=1.0]
SEE ALSO gr_plot_char(1)gr_plot_const(1)gr_plot_fft_c(1)gr_plot_fft_f(1)gr_plot_float(1)gr_plot_int(1)gr_plot_iq(1)gr_plot_psd_c(1)gr_plot_psd_f(1)gr_plot_qt(1)gr_plot_short(1)gr_plot_char 3.5 December 2011 GR_PLOT_CHAR(1)