Alterar padrão de data em arquivos
exemplo de um arquivo texto
11|16952|1|0|065277493000408|7739|3|944783|1|729904|93.03|93.03|1.65|7.60|1.53|7.07|1862519|1|0|30/10/2017 00:17:50|56|
11|16953|1|0|065277493000408|7737|3|944540|1|729902|88.98|88.98|1.65|7.60|1.46|6.77|1862517|1|0|30/10/2017 00:17:47|56|
sed -E 's,([0-9]{2})/([0-9]{2})/([0-9]{4}),\3-\2-\1,g' frete.csv > frete.unl
resultado:
11|16952|1|0|065277493000408|7739|3|944783|1|729904|93.03|93.03|1.65|7.60|1.53|7.07|1862519|1|0|2017-10-30 00:17:50|56| 11|16953|1|0|065277493000408|7737|3|944540|1|729902|88.98|88.98|1.65|7.60|1.46|6.77|1862517|1|0|2017-10-30 00:17:47|56|
resultado:
11|16952|1|0|065277493000408|7739|3|944783|1|729904|93.03|93.03|1.65|7.60|1.53|7.07|1862519|1|0|2017-10-30 00:17:50|56| 11|16953|1|0|065277493000408|7737|3|944540|1|729902|88.98|88.98|1.65|7.60|1.46|6.77|1862517|1|0|2017-10-30 00:17:47|56|