08-01-2005
You could try this code :
toto=`telnet <machine name> 13`
datetime=`echo ${toto} | cut -d' ' -f10-`
Regards.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I need the unix command which returns only the file name and its creation date/time in unix.
I tried ls -l <filename>. But that is giving other details also which I do not want.
Could anyone help me out?
Thanks. (6 Replies)
Discussion started by: unipepper
6 Replies
2. Shell Programming and Scripting
Hi guys,
I know that this topic has been discuss numerous times, and I have search the net and this forum for it.
However, non able to address the problem I faced so far.
I am on Solaris Platform and unable to install additional packages like the GNU date and gawk to make use of their... (5 Replies)
Discussion started by: DrivesMeCrazy
5 Replies
3. Shell Programming and Scripting
Hi, I need to convert a date in the format
yyyy-mm-dd to unix seconds, shell script or perl would be ok
since there is no hour/second, we can assume 12am every day
thanks in advance
funksen (4 Replies)
Discussion started by: funksen
4 Replies
4. Shell Programming and Scripting
while read l
do
vTimeCreated=`perl -e '@d=localtime ((stat(shift))); printf "%02d-%02d-%04d %02d:% 02d:%02d\n", $d,$d+1,$d+1900,$d,$d,$d' ${l}`
echo "${l} || ${vTimeCreated}" >> ${fPrefx}_Output_Files_${vDate}.txt
done < servername.txt Using the above code to format date time for each of the... (0 Replies)
Discussion started by: HeadBang
0 Replies
5. UNIX for Dummies Questions & Answers
while read l
do
vTimeCreated=`perl -e '@d=localtime ((stat(shift))); printf "%02d-%02d-%04d %02d:% 02d:%02d\n", $d,$d+1,$d+1900,$d,$d,$d' ${l}`
echo "${l} || ${vTimeCreated}" >> ${fPrefx}_Output_Files_${vDate}.txt
done < servername.txt
Using the above code to format date time for each of... (5 Replies)
Discussion started by: HeadBang
5 Replies
6. UNIX for Dummies Questions & Answers
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
7. Solaris
I have a cluster of two Solaris server (veritas cluster). one working and the other is standby
I am going to change the date on them , and am looking for a secure solution as it is giving an important service.
my opinion is that the active one doesn't need to be restarted (if I don't change the... (1 Reply)
Discussion started by: barry1946
1 Replies
8. Shell Programming and Scripting
I needed some help in adding a duration (in seconds) to a start time (in hhmmss format) and a start date (in mmddyy format) in order to get an end date and end time. The concept of a leap year is also to be considered while incrementing the day. The code/ function that I have formed so far is as... (3 Replies)
Discussion started by: codehelp04
3 Replies
9. Shell Programming and Scripting
There are 2 dates,
Tue Oct 1 13:40:19 2013
Sun Sept 30 10:26:23 2013
I have multiple dates like the above one. How do I calculate the date time difference and display in another column in Shell script. Please help. (3 Replies)
Discussion started by: tanmoysays
3 Replies
10. Shell Programming and Scripting
Hi, I am extracting a date string from the source file like this :
06/05/2014 16:04:00
I want to change it to 05-JUN-14 04.05.00.000000000 PM
I basically store the date in a variable. I got solutions to change date in dd-mmm-yyyy format using tr but I guess it works only with the "date"... (8 Replies)
Discussion started by: Varshha
8 Replies
LEARN ABOUT DEBIAN
datetime::format::w3cdtf
DateTime::Format::W3CDTF(3pm) User Contributed Perl Documentation DateTime::Format::W3CDTF(3pm)
NAME
DateTime::Format::W3CDTF - Parse and format W3CDTF datetime strings
SYNOPSIS
use DateTime::Format::W3CDTF;
my $w3c = DateTime::Format::W3CDTF->new;
my $dt = $w3c->parse_datetime( '2003-02-15T13:50:05-05:00' );
# 2003-02-15T13:50:05-05:00
$w3c->format_datetime($dt);
DESCRIPTION
This module understands the W3CDTF date/time format, an ISO 8601 profile, defined at http://www.w3.org/TR/NOTE-datetime. This format as
the native date format of RSS 1.0.
It can be used to parse these formats in order to create the appropriate objects.
METHODS
This API is currently experimental and may change in the future.
o new()
Returns a new W3CDTF parser object.
o parse_datetime($string)
Given a W3CDTF datetime string, this method will return a new "DateTime" object.
If given an improperly formatted string, this method may die.
o format_datetime($datetime)
Given a "DateTime" object, this methods returns a W3CDTF datetime string.
NOTE: As of version 0.4, format_datetime no longer attempts to truncate datetimes without a time component. This is due to the fact
that "DateTime" doesn't distinguish between a date with no time component, and midnight.
o format_date($datetime)
Given a "DateTime" object, return a W3CDTF datetime string without the time component.
SUPPORT
Support for this module is provided via the datetime@perl.org email list. See http://datetime.perl.org/?MailingList for details.
Please submit bugs to the CPAN RT system at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=datetime-format-w3cdtf or via email at
bug-datetime-format-w3cdtf@rt.cpan.org.
AUTHOR
Dave Rolsky <autarch@urth.org>
CREDITS
This module is maintained by Gregory Todd Williams <gwilliams@cpan.org>. It was originally created by Kellan Elliott-McCrea
<kellan@protest.net>.
This module was inspired by DateTime::Format::ICal
COPYRIGHT
Copyright (c) 2009 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.
Copyright (c) 2003 Kellan Elliott-McCrea
Portions of the code in this distribution are derived from other works. Please see the CREDITS file for more details.
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
datetime@perl.org mailing list
http://datetime.perl.org/
perl v5.10.1 2011-02-06 DateTime::Format::W3CDTF(3pm)