# replace dd.mm.yyyy DATE FORMAT to yyyy-mm-dd sed -i -E "s/([0-9]{2})\.([0-9]{2})\.([0-9]{4})/\3-\2-\1/g" inputfile_with_dates.txt