Created
May 10, 2012 16:43
-
-
Save sbeckeriv/2654391 to your computer and use it in GitHub Desktop.
time geeklet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
expr `date -j -f "%d/%m/%Y %H:%M:%S" "7/5/2012 09:54:00" "+%s"` - `date "+%s"` | awk '{ if( int( $1/86400 ) < 0 ) printf "@ Amazon for ⟶ %d days, " , int( $1/86400 ) ; if( int( $1/86400 ) < 0 || int( $1%86400/3600 ) < 0 ) printf "%d hours, " , int( $1%86400/3600 ) ; if( int( $1/86400 ) < 0 || int( $1%86400/3600 ) < 0 || int( $1%3600/60 ) < 0) printf "%d minutes, " , int( $1%3600/60 ) ; if( int( $1/86400 ) < 0 || int( $1%86400/3600 ) < 0 || int( $1%3600/60 ) < 0 || $1%60 < 0 ) printf "%d seconds" , $1%60 ; else printf "Hello!" }' | sed -E 's/-/ /' | sed -E 's/-/ /' | sed -E 's/-/ /' | sed -E 's/-/ /' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment