I have following format in file aaa with content below, and would like to seek help from forumer about how to change and swap the position on 2nd field.
if you have Python and you know the language, here's an alternative
#!/usr/bin/python
# assumption: doesn't take care of dates before 1970.
import time
for line in open("file"):
line=line.strip().split("|")
first,second = line[0],line[1]
t = time.strptime(second , "%y%m%d")
thedate = time.strftime("%d-%m-%Y",t)
print "%s|%s" % (first,thedate)