I have a | separated file and want to replace columns 2, 4, 6, 7 dates from 20200929 to 20201007.
File: e.lst
1|20200929|mni|20200929|pqr|20200929|20200929
2|20200929|mni|20200929|abc|20200929|20200929
3|20200929|mni|20200929|lmn|20200929|20200929
4|20200929|mni|20200929|stu|20200929|20200929
Command I tried is working for 2 columns.
awk -F\| '{OFS=FS}$2=20201007, $4=20201007 {print}' e.lst > ne.lst
But the same command when I add more columns to it, it gives a syntax error.
awk -F\| '{OFS=FS}$2=20201007, $4=20201007, $6=20201007 {print}' e.lst > ne.lst
^syntax error