I have around 2000+ files which has random number of columns in each file. I wanted to remove last 4 columns from each of the file.
I tried to use below command, but it is not an inline command. Delimiter of the file is #
awk -F"#" '{NF-=4;OFS="#";print}' test > testing.csv
I wanted to save the file with the same name.(e.g. filename test with test only)
How to remove last 4 columns and save the file with same name? Can someone please help?