Search Results

Search: Posts Made By: anbu23
2,751
Posted By anbu23
$ cat testk3.csv "PERIOD_END_DATE"...
$ cat testk3.csv
"PERIOD_END_DATE" "PERIOD_END_DATE"
"17-FEB-19" "17-FEB-19"
"24-FEB-19" "24-FEB-19"
"24-FEB-19" "24-FEB-19"
$ awk -F, -v yr='"YEAR"' ' { $0=$0 OFS (NR == 1 ? yr : "20"...
2,751
Posted By anbu23
can you post sample data from testk3.csv?
can you post sample data from testk3.csv?
2,751
Posted By anbu23
Yes this will replace any year(If year is less...
Yes this will replace any year(If year is less than 2000 then prefix 19) and you can pass csv file to awk
2,751
Posted By anbu23
$ awk -F, -v yr='"YEAR"' ' { $0=$0 OFS (NR == 1 ?...
$ awk -F, -v yr='"YEAR"' ' { $0=$0 OFS (NR == 1 ? yr : "20" substr($0,length($0)-2,3)) } 1 ' OFS="," file
"abc","sdf","sdf","we","qe","fr","ty","hgf","er","jy","END_DATE","YEAR"...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 02:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy