11-21-2010
You need to install gnu date for OSX - there is no way to make other date utilities to behave like GNU date
try MacPorts:
The MacPorts Project -- Home
9 More Discussions You Might Find Interesting
1. BSD
for all you unix/linux interested heres an online book for free that covers the basics of BSD SysV Unix commands and applications . giving the average linux user a perspective on the differences in context of the two operating systems and for BSD users covers material as a refernce guide.
... (0 Replies)
Discussion started by: moxxx68
0 Replies
2. UNIX for Dummies Questions & Answers
I know there are some posts on getting the time with milliseconds included and I realize unix may not be the best on this.
I have seem some posts where its advised to install the GNU date.
Any one know where I can download this as I am struggling to find it.
Alternatively - if you have... (5 Replies)
Discussion started by: frustrated1
5 Replies
3. BSD
Is anyone using or planning to use GNU BSD in production yet? I'd like to hear experiences. (Debian GNU/NetBSD) (8 Replies)
Discussion started by: vpsville
8 Replies
4. UNIX for Dummies Questions & Answers
I use GNU (parted)set to change boot flags when doing multibooting.
Alas, FreeBSD does not have GNU parted, out of the box.
Is there a way to set/remove flags quickly and easily from the command line in BSD? I'm still learning all the 'unique' BSD utilities. (7 Replies)
Discussion started by: uiop44
7 Replies
5. Shell Programming and Scripting
Should work in any shell, but requires GNU date, although GNU date seems only to be happy for input dates between 1902 and 2037, inclusive (49673 days).
Assume $a and $b hold two dates, e.g.
set a=2010-03-27
set b=2010-04-04
Marginally faster:
iterator: seq -f "$a +%1.0f days" 1 50000 |... (0 Replies)
Discussion started by: laddiebuck
0 Replies
6. UNIX for Dummies Questions & Answers
It's easy as pie to get the date minus one day on opensolaris:
date -d "-1 day" +"%Y%m%d"run this command on our crappy Solaris 10 machines however (which I'm guessing doesn't have GNU date running on it) and you get:
date: illegal option -- d
date: illegal option -- 1
date: illegal option --... (5 Replies)
Discussion started by: rich@ardz
5 Replies
7. Shell Programming and Scripting
Firstly, I would like to apologize if this is not the appropriate sub-forum to post about GNU/BSD makefile scripting. Though my code is in C++, because I am focusing on the makefile I thought it would go better in shell scripting. Please correct me if I am wrong.
Secondly, I am not interested in... (0 Replies)
Discussion started by: AntumDeluge
0 Replies
8. UNIX for Advanced & Expert Users
Hello All,
Greetings all !!
I have a query here, following are the points on same(Adding today's is 31st August 2016 for future reference).
1st Scenario: So while doing some work on GNU date, I wanted to check what was the month(in numbers) by GNU date so I have done following.
date... (2 Replies)
Discussion started by: RavinderSingh13
2 Replies
9. Shell Programming and Scripting
So as I write this today is two days after the clocks go back here in the UK. I have a script that worked last week. Yesterday it developed a bug. I eventually found the culprit is Gnu Date.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS... (10 Replies)
Discussion started by: apmcd47
10 Replies
LEARN ABOUT DEBIAN
email::date
Email::Date(3pm) User Contributed Perl Documentation Email::Date(3pm)
NAME
Email::Date - Find and Format Date Headers
SYNOPSIS
use Email::Date;
my $email = join '', <>;
my $date = find_date($email);
print $date->ymd;
my $header = format_date($date->epoch);
Email::Simple->create(
header => [
Date => $header,
],
body => '...',
);
DESCRIPTION
RFC 2822 defines the "Date:" header. It declares the header a required part of an email message. The syntax for date headers is clearly
laid out. Stil, even a perfectly planned world has storms. The truth is, many programs get it wrong. Very wrong. Or, they don't include a
"Date:" header at all. This often forces you to look elsewhere for the date, and hoping to find something.
For this reason, the tedious process of looking for a valid date has been encapsulated in this software. Further, the process of creating
RFC compliant date strings is also found in this software.
FUNCTIONS
find_date
my $time_piece = find_date $email;
"find_date" accepts an email message in any format Email::Abstract can understand. It looks through the email message and finds a date,
converting it to a Time::Piece object.
If it can't find a date, it returns false.
"find_date" is exported by default.
format_date
my $date = format_date; # now
my $date = format_date( time - 60*60 ); # one hour ago
"format_date" accepts an epoch value, such as the one returned by "time". It returns a string representing the date and time of the
input, as specified in RFC 2822. If no input value is provided, the current value of "time" is used.
"format_date" is exported by default.
format_gmdate
my $date = format_gmdate;
"format_gmdate" is identical to "format_date", but it will return a string indicating the time in Greenwich Mean Time, rather than
local time.
"format_gmdate" is exported on demand, but not by default.
PERL EMAIL PROJECT
This module is maintained by the Perl Email Project
<http://emailproject.perl.org/wiki/Email::Date>
SEE ALSO
Email::Abstract, Time::Piece, Date::Parse, perl.
AUTHOR
Casey West, <casey@geeknest.com>.
Ricardo SIGNES, <rjbs@cpan.org>.
COPYRIGHT
Copyright (c) 2004 Casey West. All rights reserved.
This module is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
perl v5.10.1 2007-12-01 Email::Date(3pm)