Hi,
i want to delete a column from a file. the file is like :
1|2|3|4|5|6|7|8|9|0
1|2|3|4|5|6|7|8|9|0
1|2|3|4|5|6|7|8|9|0
1|2|3|4|5|6|7|8|9|0
1|2|3|4|5|6|7|8|9|0
1|2|3|4|5|6|7|8|9|0
if i want to remove any column the outout should be like ( suppose 4):
1|2|3|5|6|7|8|9|0
1|2|3|5|6|7|8|9|0
1|2|3|5|6|7|8|9|0
1|2|3|5|6|7|8|9|0
1|2|3|5|6|7|8|9|0
1|2|3|5|6|7|8|9|0
i have used swk command, but its not giving the desired output: its giving some extra delimeters:
awk 'BEGIN{FS=OFS="|"}{$4="";gsub(FS,"")}1' file
please help