Sponsored Content
Full Discussion: awk date and time validation
Top Forums Shell Programming and Scripting awk date and time validation Post 302323512 by panyam on Monday 8th of June 2009 06:15:12 AM
Old 06-08-2009
Code:
echo "21/04/2009 14:20:06" | awk -F"[:/]" '{ print $1 }'

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Time Validation in UNIX?

I am very new to scripting in UNIX and in need of help. I am creating a program that will check a file that has a target time in the form of HH:MM:SS before another program can begin executing. The file with the target time will only have that target time in it and nothing else. Is there any way... (1 Reply)
Discussion started by: mosammey
1 Replies

2. UNIX for Dummies Questions & Answers

How Can I Do Time Validation in UNIX

I am very new to scripting in UNIX and in need of help. I am creating a program that will check a file that has a target time in the form of HH:MM:SS before another program can begin executing. The file with the target time will only have that target time in it and nothing else. Is there any... (4 Replies)
Discussion started by: mosammey
4 Replies

3. Shell Programming and Scripting

AWK and sub/gsub: updating a date/time block

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: .ROMULT 10150908EDT 10270908EDT 10010908EDT RANGE RAWV2 1.00 .ROMULT 10150908EDT 10270908EDT 10010908EDT FGROUP CHOWANRV 1.00 .RRIMULT 10150908EDT... (10 Replies)
Discussion started by: chrismcg24
10 Replies

4. Shell Programming and Scripting

awk & date time format

This gives: grep "qprt -o -dp -N 1 -P" printfile.log.1216 |awk '{print $7, $9}' |grep lpc1z The output like below: lpc1z /cerner/d_prod/print/ccltemp4235396d030a.dat.tmp.1216075330] lpc1z /cerner/d_prod/print/ccltemp4235396d036a.dat.tmp.1216075634] lpc1z... (2 Replies)
Discussion started by: Daniel Gate
2 Replies

5. Shell Programming and Scripting

Date and time range extraction via Awk or analysis script?

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)
Discussion started by: competitions
2 Replies

6. Shell Programming and Scripting

Using awk or nawk to convert epoch time to date format

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)
Discussion started by: minigts
5 Replies

7. Shell Programming and Scripting

Date validation

File contains below data,how to validate the date using awk command or any command. date formate is fixed as "YYYYMMDD" test1|20120405 test2|20121405 output should be: test1|20120405 Thanks (2 Replies)
Discussion started by: bmk
2 Replies

8. Shell Programming and Scripting

Access log field - using awk to pull date/time

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)
Discussion started by: SkySmart
5 Replies

9. UNIX for Dummies Questions & Answers

Converting string date time to unix time in AWK

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)
Discussion started by: bkkid
2 Replies

10. Shell Programming and Scripting

Validate date and time in filename by awk

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
DateTime::Locale::km_KH(3)				User Contributed Perl Documentation				DateTime::Locale::km_KH(3)

NAME
DateTime::Locale::km_KH SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'km_KH' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Khmer Cambodia. DATA
This locale inherits from the DateTime::Locale::km locale. It contains the following data. Days Wide (format) XXXXXXXXXX XXXXXXXXXX XXXXXXX XXXXXXXXXXXXXX XXXXXXXXX XXXXXXXX XXXXXXXXXXX Abbreviated (format) X X XX XXX XX X XX Narrow (format) 2 3 4 5 6 7 1 Wide (stand-alone) XXXXXXXXXX XXXXXXXXXX XXXXXXX XXXXXXXXXXXXXX XXXXXXXXX XXXXXXXX XXXXXXXXXXX Abbreviated (stand-alone) X X XX XXX XX X XX Narrow (stand-alone) 2 3 4 5 6 7 1 Months Wide (format) XXXX XXXXXX XXXX XXXX XXXX XXXXXX XXXXXX XXXX XXXXX XXXX XXXXXXXX XXXX Abbreviated (format) X X X X X X X X X XX XX XX Narrow (format) 1 2 3 4 5 6 7 8 9 10 11 12 Wide (stand-alone) XXXX XXXXXX XXXX XXXX XXXX XXXXXX XXXXXX XXXX XXXXX XXXX XXXXXXXX XXXX Abbreviated (stand-alone) X X X X X X X X X XX XX XX Narrow (stand-alone) 1 2 3 4 5 6 7 8 9 10 11 12 Quarters Wide (format) XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX Abbreviated (format) XXXXX XXXXX XXXXX XXXXX Narrow (format) 1 2 3 4 Wide (stand-alone) XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX Abbreviated (stand-alone) XXXXX XXXXX XXXXX XXXXX Narrow (stand-alone) 1 2 3 4 Eras Wide XXXXXXXXXXXXXXXX XXXXXXXXXXXX Abbreviated XXXXX.X. X.X. Narrow XXXXX.X. X.X. Date Formats Full 2008-02-05T18:30:30 = XXXXXXXXXX XXXX 5 XX XXXXXX XXXXX 2008 1995-12-22T09:05:02 = XXXXXXXXX XXXX 22 XX XXXX XXXXX 1995 -0010-09-15T04:44:23 = XXXXXXXX XXXX 15 XX XXXXX XXXXX -10 Long 2008-02-05T18:30:30 = 5 XX XXXXXX XXXXX 2008 1995-12-22T09:05:02 = 22 XX XXXX XXXXX 1995 -0010-09-15T04:44:23 = 15 XX XXXXX XXXXX -10 Medium 2008-02-05T18:30:30 = 5 X 2008 1995-12-22T09:05:02 = 22 XX 1995 -0010-09-15T04:44:23 = 15 X -10 Short 2008-02-05T18:30:30 = 5/2/2008 1995-12-22T09:05:02 = 22/12/1995 -0010-09-15T04:44:23 = 15/9/-010 Default 2008-02-05T18:30:30 = 5 X 2008 1995-12-22T09:05:02 = 22 XX 1995 -0010-09-15T04:44:23 = 15 X -10 Time Formats Full 2008-02-05T18:30:30 = 18 XXXX 30 XXXX 30 XXXXXXX UTC 1995-12-22T09:05:02 = 9 XXXX 5 XXXX 02 XXXXXXX UTC -0010-09-15T04:44:23 = 4 XXXX 44 XXXX 23 XXXXXXX UTC Long 2008-02-05T18:30:30 = 18 XXXX 30 XXXX 30 XXXXXXXUTC 1995-12-22T09:05:02 = 9 XXXX 5 XXXX 02 XXXXXXXUTC -0010-09-15T04:44:23 = 4 XXXX 44 XXXX 23 XXXXXXXUTC Medium 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 Short 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 Default 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 Datetime Formats Full 2008-02-05T18:30:30 = XXXXXXXXXX XXXX 5 XX XXXXXX XXXXX 2008, 18 XXXX 30 XXXX 30 XXXXXXX UTC 1995-12-22T09:05:02 = XXXXXXXXX XXXX 22 XX XXXX XXXXX 1995, 9 XXXX 5 XXXX 02 XXXXXXX UTC -0010-09-15T04:44:23 = XXXXXXXX XXXX 15 XX XXXXX XXXXX -10, 4 XXXX 44 XXXX 23 XXXXXXX UTC Long 2008-02-05T18:30:30 = 5 XX XXXXXX XXXXX 2008, 18 XXXX 30 XXXX 30 XXXXXXXUTC 1995-12-22T09:05:02 = 22 XX XXXX XXXXX 1995, 9 XXXX 5 XXXX 02 XXXXXXXUTC -0010-09-15T04:44:23 = 15 XX XXXXX XXXXX -10, 4 XXXX 44 XXXX 23 XXXXXXXUTC Medium 2008-02-05T18:30:30 = 5 X 2008, 18:30:30 1995-12-22T09:05:02 = 22 XX 1995, 9:05:02 -0010-09-15T04:44:23 = 15 X -10, 4:44:23 Short 2008-02-05T18:30:30 = 5/2/2008, 18:30 1995-12-22T09:05:02 = 22/12/1995, 9:05 -0010-09-15T04:44:23 = 15/9/-010, 4:44 Default 2008-02-05T18:30:30 = 5 X 2008, 18:30:30 1995-12-22T09:05:02 = 22 XX 1995, 9:05:02 -0010-09-15T04:44:23 = 15 X -10, 4:44:23 Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 EEEd (d EEE) 2008-02-05T18:30:30 = 5 X 1995-12-22T09:05:02 = 22 XX -0010-09-15T04:44:23 = 15 X hhmm (hh:mm a) 2008-02-05T18:30:30 = 06:30 XXXXX 1995-12-22T09:05:02 = 09:05 XXXXX -0010-09-15T04:44:23 = 04:44 XXXXX hhmmss (hh:mm:ss a) 2008-02-05T18:30:30 = 06:30:30 XXXXX 1995-12-22T09:05:02 = 09:05:02 XXXXX -0010-09-15T04:44:23 = 04:44:23 XXXXX Hm (H:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 XXXXX 1995-12-22T09:05:02 = 9:05 XXXXX -0010-09-15T04:44:23 = 4:44 XXXXX Hms (H:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 XXXXX 1995-12-22T09:05:02 = 9:05:02 XXXXX -0010-09-15T04:44:23 = 4:44:23 XXXXX M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (d/M) 2008-02-05T18:30:30 = 5/2 1995-12-22T09:05:02 = 22/12 -0010-09-15T04:44:23 = 15/9 MEd (E, M-d) 2008-02-05T18:30:30 = X, 2-5 1995-12-22T09:05:02 = XX, 12-22 -0010-09-15T04:44:23 = X, 9-15 MMM (LLL) 2008-02-05T18:30:30 = X 1995-12-22T09:05:02 = XX -0010-09-15T04:44:23 = X MMMd (MMM d) 2008-02-05T18:30:30 = X 5 1995-12-22T09:05:02 = XX 22 -0010-09-15T04:44:23 = X 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = X X 5 1995-12-22T09:05:02 = XX XX 22 -0010-09-15T04:44:23 = X X 15 MMMMd (d MMMM) 2008-02-05T18:30:30 = 5 XXXXXX 1995-12-22T09:05:02 = 22 XXXX -0010-09-15T04:44:23 = 15 XXXXX MMMMEd (E MMMM d) 2008-02-05T18:30:30 = X XXXXXX 5 1995-12-22T09:05:02 = XX XXXX 22 -0010-09-15T04:44:23 = X XXXXX 15 mmss (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yM (y-M) 2008-02-05T18:30:30 = 2008-2 1995-12-22T09:05:02 = 1995-12 -0010-09-15T04:44:23 = -10-9 yMEd (EEE, y-M-d) 2008-02-05T18:30:30 = X, 2008-2-5 1995-12-22T09:05:02 = XX, 1995-12-22 -0010-09-15T04:44:23 = X, -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 X 1995-12-22T09:05:02 = 1995 XX -0010-09-15T04:44:23 = -10 X yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = X, 2008 X 5 1995-12-22T09:05:02 = XX, 1995 XX 22 -0010-09-15T04:44:23 = X, -10 X 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 XXXXXX 1995-12-22T09:05:02 = 1995 XXXX -0010-09-15T04:44:23 = -10 XXXXX yQ (y Q) 2008-02-05T18:30:30 = 2008 1 1995-12-22T09:05:02 = 1995 4 -0010-09-15T04:44:23 = -10 3 yQQQ (y QQQ) 2008-02-05T18:30:30 = 2008 XXXXX 1995-12-22T09:05:02 = 1995 XXXXX -0010-09-15T04:44:23 = -10 XXXXX yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 yyQQQQ (QQQQ yy) 2008-02-05T18:30:30 = XXXXXXXXXX 08 1995-12-22T09:05:02 = XXXXXXXXXX 95 -0010-09-15T04:44:23 = XXXXXXXXXX -10 yyyyM (M/yyyy) 2008-02-05T18:30:30 = 2/2008 1995-12-22T09:05:02 = 12/1995 -0010-09-15T04:44:23 = 9/-010 yyyyMMMM (MMMM y) 2008-02-05T18:30:30 = XXXXXX 2008 1995-12-22T09:05:02 = XXXX 1995 -0010-09-15T04:44:23 = XXXXX -10 Miscellaneous Prefers 24 hour time? Yes Local first day of the week XXXXXXXXXX SUPPORT
See DateTime::Locale. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's license. perl v5.18.2 2017-10-06 DateTime::Locale::km_KH(3)
All times are GMT -4. The time now is 01:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy