Imagine that I've the next txt format:
'20201': "a" ,
'20202': "e" ,
'20203': "i" ,
'20204': "o" ,
'20205': "u" ,
'20207': "ae" ,
'20209': "ai" ,
'20210': "ao"
And I want to erase the four digit when it's a 0. So the expected output is:
'2021': "a" ,
'2022': "e" ,
'2023': "i" ,
'2024': "o" ,
'2025': "u" ,
'2027': "ae" ,
'2029': "ai" ,
'20210': "ao"
I'm thinking about this:
awk -i inplace ' { for ( i = 1; i <= NF; ++i ) {
if ( $i == '0')
r = 1
}
}}
1 ' example.txt ```