05-30-2019
convert MM/DD/YYYY to YYYYMMDD and compare numerically.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Date Vadidation in YYYY-MM-DD
Hi ,
Please, Help me in validating given date that is passed in arg as YYYY-MM-DD.
It should cover
check 1 <= DD <= 31 and 1 <= MM <= 12
for each mm check 1 <=DD<= {28,30,31} (depending)
for someYYYY and MM== 02 check 1 <= dd <= 29
I the... (1 Reply)
Discussion started by: itsmehihihi
1 Replies
2. Shell Programming and Scripting
I want to change a date from format dd-mmm-yyyy to mm/dd/yyyy. Is there a way to do this with sed or do you have to write a case statement to convert JAN to 01? Thanks (9 Replies)
Discussion started by: stringzz
9 Replies
3. Shell Programming and Scripting
How to convert the date field from dd/mm/yyyy to yyyy/mm/dd in unix
my script will generate text file which have two fields
one is date and another is name of the server for example this is sample date which I have to sort based on older to newer date the problem is when I found out sort will... (4 Replies)
Discussion started by: pareshan
4 Replies
4. Shell Programming and Scripting
(Attention: Green PHP newbie !)
I have an online inquiry form, delivering a date in the form yyyy/mm/dd to my feedback form. If the content passes several checks, the form sends an e-mail to me. All works fine. I just would like to receive the date in the form dd/mm/yyyy. I tried with some code,... (6 Replies)
Discussion started by: keyboarder
6 Replies
5. Shell Programming and Scripting
Hello,
I am writing a script that parses different logs and produces one. In the source files, the date is in DD MM YYYY HH24:MI:SS format. In the output, it should be in DD MON YYY HH24:MI:SS (ie 25 Jan 2010 16:10:10)
To extract the dates, I am using shell substrings, i.e.:
read line
... (4 Replies)
Discussion started by: Adamm
4 Replies
6. Shell Programming and Scripting
I have this code to compare columns 1 and 10 between file1 and file 2 and give me all records that match column 1 but dont match column 10
However column 10 is date format mm/dd/yy and awk cant read it and compare ...i tried
awk < file1 -F~ '{print $10}'
and it gave blank screen
Is... (1 Reply)
Discussion started by: sigh2010
1 Replies
7. Shell Programming and Scripting
could you please help be on the below code ..
Requirement is when i pass the parameter(for below 2) i should get current time -2 hours in the format :wall:..
cur_dt=`$ICEBIN/sqsh -S$DSQUERY -U $BATCHID -P $PASSWD -h -C"select getdate()" | sed '2d'`
pr_dt="`$ICEBIN/sqsh -S$DSQUERY -U $BATCHID... (2 Replies)
Discussion started by: karthicss
2 Replies
8. Shell Programming and Scripting
Hi I have a problem with Date format in my code.
1st I am trying to convert today's date to yesterday's using
YESTERDAY3=`perl -e '@y=localtime(time()-86400); printf "%04d/%02d/%02d",$y+1900,$y+1,$y;$y;'`
And once it is done I am trying to using the yesterday date in a grep command to... (3 Replies)
Discussion started by: nithinankam
3 Replies
9. UNIX for Dummies Questions & Answers
I've seen a lot of posts on this and have tried the following:
echo 1257000000| perl -e '($d,$m,$y)=(localtime(time-86400));$m+=1;$y+=1900;printf "$y/$m/$d\n";'
But I am unable to convert a past Epoch date into a format such as YYYY/MM/DD or MM/DD/YYYY.
I am using bash and don't know... (4 Replies)
Discussion started by: newbie2010
4 Replies
10. Shell Programming and Scripting
I am getting output of YYYY-MM-DD and want to change this to DD/MM/YYYY.
When am running the query in 'Todd' to_date(column_name,'DD/MM/YYYY') am getting the required o/p of DD/MM/YYYY, But when am executing the same query(Netezza) in linux server(bash) am getting the output of YYYY-MM-DD
file... (3 Replies)
Discussion started by: Roozo
3 Replies
LEARN ABOUT DEBIAN
net::ripewhois::in
in(3pm) User Contributed Perl Documentation in(3pm)
NAME
Net::RIPWhois::in - Perl extension for accessing inetnum objects from RIPE whois database.
SYNOPSIS
use Net::RIPEWhois::in
$in = new Net::RIPEWhois::in;
@in = getIn($whois, $prefix, $ALLOCOPT);
$whois->closeWhois();
DESCRIPTION
Get inetnum objects from RIPE whois server. Validate as allocation object.
METHODS
debug
Get or set the debug.
$in->debug(1); set the debug.
$in->debug(undef); turn off the $debug;
error
($errNo, $errMsg) = $in->error; $in->(undef, undef, true); reset the error message
Will get the last error no and error string;
if $whois->debug is set @{$in->{'errMsgAll'}} and @{$in->{'errNoAll'}} will have the list of all errors and error numbers.
new
$in = new Net::RIPEWhois::in
Creates a new inetnum object. ENV variables WHOISHOST and WHOISPORT
getIn
Return a list of inetnum objects returned by whois.
$whois = new Net::RIPEWhois;
@in = $in->getIn($whois, $prefix, $ALLOCOPT);
Selected attributes of inetnum are stored in data structure i<inetnum>. Should always query with fast raw output used by the RIPE whois
db.
$in->{inetnum}{attribute}
return undef on error. use $in->error() to get error no. and message.
splitWhoisAns
Split the response string from whois ans and return list of inetnum on sucess.
@inList = $in->splitWhoisAns( $whoisAnsRef);
Returns undef on error.
Spliting depending on fast raw output format from whois db. Use "-F" to get fast raw output.
validAlloc
Check the inetnum is an alloation or not.
Using netname same as regid, translated "." to "-" .
mnt-by RIPE-NCC-MNT ,RIPE-NCC-HM-MNT
status ALLOCATED PA, ALLOCATED PI, ALLOCATED UNSPECIFIED and not in IANA Delegated list. As specified in the specification when queried
"-L" "-T" in the range database should return max 3 inetnum objects. Assignment, Allocation & IANA delegation to RIPE. Skip if it is an
IANA delegation and aply the previous check.
@valid = $in->validAlloc(@inlist);
undef on error.
checkYYYYmmDD
Function used to check dates are valid or not. Converts to UTC on YYYYMMDD and concert back to date format if these to matchs treated ad
valid date.
$YYYYMMDD = checkYYYYmmDD($YYYYMMDD); Accepts YYMMDD and YYYYMMDD formats. YYMMDD is treated as 19YYMMDD
FILES
/ncc/ip-reg/delegations perl file with list of IANA delegations.
REQUIRES
perl module ipv4pack
AUTHOR
Antony <antony@ripe.net> software group RIPE NCC <softies@ripe.net>
SEE ALSO
perl(1), Net::RIPEWhois(3), whois(1)
perl v5.10.1 2003-07-28 in(3pm)