I have a question here
Can somebody tell me any command in unix to add an extra "column with text" according to a specific text in another column
A B C 1 left red 2 right yellow 3 left red
This is my file with three column (A, B & C).
I want to add an another column(D) with text "turn" on this column D according to text "left" in column B.
Final file should be like this:
A B C D 1 left red turn 2 right yellow 3 left red turn
I have more than 2000 rows, and more than 100 such text ,so it is difficult to do manually.