Last active
December 17, 2016 00:02
-
-
Save chapeupreto/8a8c828a8327f225fed45c1e99dce97f to your computer and use it in GitHub Desktop.
formata data do padrao EUA para BR
This file contains hidden or 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
#!/bin/bash | |
function formata() | |
{ | |
local data="$1" | |
local dia="${data:(-2)}" | |
local mes="${data:5:2}" | |
local ano="${data:0:4}" | |
echo "${dia}/${mes}/${ano}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment