Hey Anonymous Monk, thanks for the reply...
Sorry I forget exactly how the command looked I was asking about at that point... But I was able to get this working!!
And I was able to make it a little better then what I had posted at the end of this thread that I had my "resolution"
written in.
What I was doing was I had included an unneeded/unnecessary step. Here's what I did and what it is NOW...
FIRST, I had this one Perl command (below):
*This command would output the Seconds, Minutes, Hours, MDay, Month and Year.
perl -e 'use POSIX 'strftime'; $_n_days_ago = strftime("%S, %M, %k, %d, %m, %Y", localtime( time-$SECONDS )); print "$_n_days_ago\n"'
SECOND, I had this other Perl command (below):
*This command would take the output from the previous Perl command (i.e. $sec, $min, $hr, $mday, etc....) and would use
those values and feed them into this Perl Command to give me a UNIX Timestamp...
perl -e 'use Time::Local; print timelocal($sec,$min,$hour,$mday,$month,$year), "\n"'
Stupidly, not realizing that instead of those 2 commands, all's I needed to do was the 1st Perl Command and use the output
modifier -->
"%s" to print a UNIX Timestamp.... Duhhh me!!
Here's the working Command:
PAST_TIMESTAMP=$(perl -e 'use POSIX 'strftime'; $_n_days_ago = strftime("%s", localtime(time-$ENV{TOTAL_SECONDS} )); print "$_n_days_ago"')
Anyway, thanks for all the help/suggestions, very much appreciated!!
Thanks Again,
Matt
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.