I have a text file that reads
18 8 307 130 3504 12 70 1 10
15 8 350 165 3693 11 70 1 10
18 8 318 150 3436 11 70 1 10
16 8 304 150 3433 12 70 1 10
17 8 302 140 3449 10 70 1 10
where each value is separated by single space. Is there any algorithm by which we can select only specific columns instead of all columns and write them into another file?
For ex. I want to work on 1st,2nd,5th and 6th column so my code should select all attributes in those columns and rewrite them in another file.