Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: hroptatyr
1,874
Posted By hroptatyr
Using dconv from dateutils...
Using dconv from dateutils (http://www.fresse.org/dateutils/):

dconv -i '%Y%D' 2013159
=> 2013-06-08
2,943
Posted By hroptatyr
Ah I see. No, what happens is dconv with no...
Ah I see. No, what happens is dconv with no output format specifiers will return ISO 8601 dates (aka 2012-10-31T17:44:00) which are sortable just like that, UNLESS of course you go before the year...
2,943
Posted By hroptatyr
I mean that dconv is actually made to parse and...
I mean that dconv is actually made to parse and operate on dates, sort is not.



True.



You guessed wrong. And I'm curious as to what 3 characters you meant? Also, dconv doesn't depend...
2,943
Posted By hroptatyr
With a slight overhead (about double run time)...
With a slight overhead (about double run time) you could use dateutils (http://hroptatyr.github.com/dateutils/) dconv tool to normalise the data, sort them, and convert them back:

dconv -i...
3,401
Posted By hroptatyr
Or use dateutils...
Or use dateutils (http://hroptatyr.github.com/dateutils/), e.g.

dconv yesterday -f '%Y/%b/%d'
3,331
Posted By hroptatyr
Using dateutils...
Using dateutils (http://hroptatyr.github.com/dateutils/) this would be:

dadd today -8mo
=>
2011-12-31
8,330
Posted By hroptatyr
If a little extra tool is fine have a look at...
If a little extra tool is fine have a look at dateutils (http://hroptatyr.github.com/dateutils/). What you want:

dconv 2012-08-03-05 -f '%Y-%m-%d'
=>
2012-08-17

which makes use of a...
18,111
Posted By hroptatyr
If it's feasible for you to use an external...
If it's feasible for you to use an external helper tool, check out my dateutils (http://hroptatyr.github.com/dateutils) (http://hroptatyr.github.com/dateutils).

ddiff -i '%Y%m%d|%H%M%S'...
8,063
Posted By hroptatyr
date -d '20120404' +%W
date -d '20120404' +%W
2,953
Posted By hroptatyr
That's not possible, I'm afraid, you can use...
That's not possible, I'm afraid, you can use /usr/bin/env as shebang to find the user's preferred command, or rather, the command in the user's environment. But you can't "change" the shebang...
Forum: Programming 04-16-2012
2,004
Posted By hroptatyr
How about? sed 's/ 0\.0/*/g'
How about?

sed 's/ 0\.0/*/g'
Showing results 1 to 11 of 11

 

Featured Tech Videos

All times are GMT -4. The time now is 12:46 AM.
Unix & Linux Forums Content Copyright 1993-2021. All Rights Reserved.
Privacy Policy