Sponsored Content
Top Forums Shell Programming and Scripting Validating the input date format Post 302220230 by zaxxon on Thursday 31st of July 2008 07:36:02 AM
Old 07-31-2008
What have you tried so far? As a start, you can use case/esac to check the input.
 

10 More Discussions You Might Find Interesting

1. Programming

validating input

how do i validate y script so that it only accepts values between 1 and 3 and against any character input, cause at the moment i can only validate against numbers outside 1 and 3 but not characters cheers (4 Replies)
Discussion started by: ruffenator
4 Replies

2. Shell Programming and Scripting

validating input using regular expressions

I am trying to validate input from the user in a script. I thought is was easy to do using regular expressions but I can't figure out how to use REs in a conditional. I have tried using grep from a temp file, sed from a temp file, sed from command line, comparison in an if condition and I cannot... (1 Reply)
Discussion started by: nrodolfich
1 Replies

3. Shell Programming and Scripting

Validating user input is not blank

Trying to create a script in BASH that would ask the user to enter another user name making sure the input is not blank before they hit enter then to check the home directory of that user does exist, I have the check folder sorted it's just the loop to make sure the user has entered chars (5 Replies)
Discussion started by: MBN
5 Replies

4. Shell Programming and Scripting

validating a input file for numeric and character

i have a input file like this 001|rahim|bajaj|20090102 while reading the file i need to check whether the first column is a number second column is a name is there any methodology to check for the same thanks in advance (2 Replies)
Discussion started by: trichyselva
2 Replies

5. Shell Programming and Scripting

Need to validate a date input format

Hi all, I have a shell script(K shell) which takes a date as input. i want the input to be in DD-MM-YYYY format. Can i enforce such a format of input string using just one line of code? OR do i need to parse the input date into different components and test them using Case statements... (2 Replies)
Discussion started by: rajugp1
2 Replies

6. UNIX for Dummies Questions & Answers

Validating input based on fixed number of fields

Yes, i did... let me state my problem in more detail Inputs: I have one input CSV file And, i have stored no. of comma each line should in a variable. e.g. $ cat cmt.csv this, is a ,comma ,count test1 ,,this, is a ,comma ,count test2 this, is a ,comma ,count test3... (6 Replies)
Discussion started by: Dipali
6 Replies

7. Shell Programming and Scripting

Validating Input parameters

Hi All, I have tried to use ckdate (sun) command in script. It checks the input parameter which should be in 'YYYYMMDD format. date=$( echo $1 | ckdate -f "%Y%m%d") | true if ] then print " success" else print "no success" fi But in whatever format i pass the parameter,... (3 Replies)
Discussion started by: Amit.Sagpariya
3 Replies

8. UNIX for Dummies Questions & Answers

Validating user input

I'm trying to set up a script that takes user input and validates that the user input was entered correctly. So far I have this: while : do echo "Please enter your name." read NAME if then echo "You have not entered a name." echo... (13 Replies)
Discussion started by: fufaso
13 Replies

9. Shell Programming and Scripting

Check input date format?

how to check input date format. for example $input_date must be in format dd.mm.gg script is execute like this: bin/script1.sh 14.12.2009 script1.sh code: #!/bin/sh input_date=$1 CMD="/app/si/test/test.sh $input_date" echo "*****" $CMD (2 Replies)
Discussion started by: waso
2 Replies

10. Shell Programming and Scripting

Validating date in yyyymmdd format using PERL

Hi all, i had a code where in user will enter a date in yyyymmdd format.. i didnt use any validation for the date and now the problem is if a user enters date instead of month after year it is proceeding with the code.. like if the date is 20120426 and if the user enters 20122604 it... (4 Replies)
Discussion started by: smarty86
4 Replies
DateTime::Locale::lv(3pm)				User Contributed Perl Documentation				 DateTime::Locale::lv(3pm)

NAME
DateTime::Locale::lv - DateTime locale package for "lv" SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'lv' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Latvian. DATA
This locale inherits from the DateTime::Locale::root locale. It contains the following data. Days Wide (format) pirmdiena otrdiena treXdiena ceturtdiena piektdiena sestdiena svXtdiena Abbreviated (format) Pr Ot Tr Ce Pk Se Sv Narrow (format) P O T C P S S Wide (stand-alone) pirmdiena otrdiena treXdiena ceturtdiena piektdiena sestdiena svXtdiena Abbreviated (stand-alone) Pr Ot Tr Ce Pk Se Sv Narrow (stand-alone) P O T C P S S Months Wide (format) janvXris februXris marts aprXlis maijs jXnijs jXlijs augusts septembris oktobris novembris decembris Abbreviated (format) janv. febr. marts apr. maijs jXn. jXl. aug. sept. okt. nov. dec. Narrow (format) J F M A M J J A S O N D Wide (stand-alone) janvXris februXris marts aprXlis maijs jXnijs jXlijs augusts septembris oktobris novembris decembris Abbreviated (stand-alone) janv. febr. marts apr. maijs jXn. jXl. aug. sept. okt. nov. dec. Narrow (stand-alone) J F M A M J J A S O N D Quarters Wide (format) 1. ceturksnis 2. ceturksnis 3. ceturksnis 4. ceturksnis Abbreviated (format) C1 C2 C3 C4 Narrow (format) 1 2 3 4 Wide (stand-alone) 1. ceturksnis 2. ceturksnis 3. ceturksnis 4. ceturksnis Abbreviated (stand-alone) C1 C2 C3 C4 Narrow (stand-alone) 1 2 3 4 Eras Wide pirms mXsu Xras mXsu XrX Abbreviated p.m.X. m.X. Narrow p.m.X. m.X. Date Formats Full 2008-02-05T18:30:30 = otrdiena, 2008. gada 5. februXris 1995-12-22T09:05:02 = piektdiena, 1995. gada 22. decembris -0010-09-15T04:44:23 = sestdiena, -10. gada 15. septembris Long 2008-02-05T18:30:30 = 2008. gada 5. februXris 1995-12-22T09:05:02 = 1995. gada 22. decembris -0010-09-15T04:44:23 = -10. gada 15. septembris Medium 2008-02-05T18:30:30 = 2008. gada 5. febr. 1995-12-22T09:05:02 = 1995. gada 22. dec. -0010-09-15T04:44:23 = -10. gada 15. sept. Short 2008-02-05T18:30:30 = 05.02.08 1995-12-22T09:05:02 = 22.12.95 -0010-09-15T04:44:23 = 15.09.-10 Default 2008-02-05T18:30:30 = 2008. gada 5. febr. 1995-12-22T09:05:02 = 1995. gada 22. dec. -0010-09-15T04:44:23 = -10. gada 15. sept. Time Formats Full 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Long 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Medium 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Short 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 Default 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Datetime Formats Full 2008-02-05T18:30:30 = otrdiena, 2008. gada 5. februXris 18:30:30 UTC 1995-12-22T09:05:02 = piektdiena, 1995. gada 22. decembris 09:05:02 UTC -0010-09-15T04:44:23 = sestdiena, -10. gada 15. septembris 04:44:23 UTC Long 2008-02-05T18:30:30 = 2008. gada 5. februXris 18:30:30 UTC 1995-12-22T09:05:02 = 1995. gada 22. decembris 09:05:02 UTC -0010-09-15T04:44:23 = -10. gada 15. septembris 04:44:23 UTC Medium 2008-02-05T18:30:30 = 2008. gada 5. febr. 18:30:30 1995-12-22T09:05:02 = 1995. gada 22. dec. 09:05:02 -0010-09-15T04:44:23 = -10. gada 15. sept. 04:44:23 Short 2008-02-05T18:30:30 = 05.02.08 18:30 1995-12-22T09:05:02 = 22.12.95 09:05 -0010-09-15T04:44:23 = 15.09.-10 04:44 Default 2008-02-05T18:30:30 = 2008. gada 5. febr. 18:30:30 1995-12-22T09:05:02 = 1995. gada 22. dec. 09:05:02 -0010-09-15T04:44:23 = -10. gada 15. sept. 04:44:23 Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 Ed (EEE, d.) 2008-02-05T18:30:30 = Ot, 5. 1995-12-22T09:05:02 = Pk, 22. -0010-09-15T04:44:23 = Se, 15. EEEd (EEE, d.) 2008-02-05T18:30:30 = Ot, 5. 1995-12-22T09:05:02 = Pk, 22. -0010-09-15T04:44:23 = Se, 15. H (H) 2008-02-05T18:30:30 = 18 1995-12-22T09:05:02 = 9 -0010-09-15T04:44:23 = 4 HHmm (HH:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 HHmmss (HH:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Hm (HH:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 PM 1995-12-22T09:05:02 = 9:05 AM -0010-09-15T04:44:23 = 4:44 AM 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 PM 1995-12-22T09:05:02 = 9:05:02 AM -0010-09-15T04:44:23 = 4:44:23 AM M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (dd.mm.) 2008-02-05T18:30:30 = 05.30. 1995-12-22T09:05:02 = 22.05. -0010-09-15T04:44:23 = 15.44. MEd (E, dd.MM.) 2008-02-05T18:30:30 = Ot, 05.02. 1995-12-22T09:05:02 = Pk, 22.12. -0010-09-15T04:44:23 = Se, 15.09. MMM (LLL) 2008-02-05T18:30:30 = febr. 1995-12-22T09:05:02 = dec. -0010-09-15T04:44:23 = sept. MMMd (d. MMM) 2008-02-05T18:30:30 = 5. febr. 1995-12-22T09:05:02 = 22. dec. -0010-09-15T04:44:23 = 15. sept. MMMEd (E, d. MMM) 2008-02-05T18:30:30 = Ot, 5. febr. 1995-12-22T09:05:02 = Pk, 22. dec. -0010-09-15T04:44:23 = Se, 15. sept. MMMMd (d. MMMM) 2008-02-05T18:30:30 = 5. februXris 1995-12-22T09:05:02 = 22. decembris -0010-09-15T04:44:23 = 15. septembris MMMMEd (E, d. MMMM) 2008-02-05T18:30:30 = Ot, 5. februXris 1995-12-22T09:05:02 = Pk, 22. decembris -0010-09-15T04:44:23 = Se, 15. septembris 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. 'g'.) 2008-02-05T18:30:30 = 2008. g. 1995-12-22T09:05:02 = 1995. g. -0010-09-15T04:44:23 = -10. g. yM (mm.yyyy.) 2008-02-05T18:30:30 = 30.2008. 1995-12-22T09:05:02 = 05.1995. -0010-09-15T04:44:23 = 44.-010. yMEd (EEE, dd.mm.yyyy.) 2008-02-05T18:30:30 = Ot, 05.30.2008. 1995-12-22T09:05:02 = Pk, 22.05.1995. -0010-09-15T04:44:23 = Se, 15.44.-010. yMMM (yyyy. 'g'. MMM) 2008-02-05T18:30:30 = 2008. g. febr. 1995-12-22T09:05:02 = 1995. g. dec. -0010-09-15T04:44:23 = -010. g. sept. yMMMEd (EEE, yyyy. 'g'. dd. MMM) 2008-02-05T18:30:30 = Ot, 2008. g. 05. febr. 1995-12-22T09:05:02 = Pk, 1995. g. 22. dec. -0010-09-15T04:44:23 = Se, -010. g. 15. sept. yMMMM (y. 'g'. MMMM) 2008-02-05T18:30:30 = 2008. g. februXris 1995-12-22T09:05:02 = 1995. g. decembris -0010-09-15T04:44:23 = -10. g. septembris yQ (Q yyyy) 2008-02-05T18:30:30 = 1 2008 1995-12-22T09:05:02 = 4 1995 -0010-09-15T04:44:23 = 3 -010 yQQQ (y QQQ) 2008-02-05T18:30:30 = 2008 C1 1995-12-22T09:05:02 = 1995 C4 -0010-09-15T04:44:23 = -10 C3 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 yyyy (y. 'g'.) 2008-02-05T18:30:30 = 2008. g. 1995-12-22T09:05:02 = 1995. g. -0010-09-15T04:44:23 = -10. g. Miscellaneous Prefers 24 hour time? Yes Local first day of the week pirmdiena 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.10.1 2010-03-19 DateTime::Locale::lv(3pm)
All times are GMT -4. The time now is 10:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy