Hlo everyone
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
Suppose:
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.
Good morning Kevin
Can you please give a little bit of explanation to the command you have suggested.
And also I have to repeat this command multiple numbers of times because I have different text in Column B and have to assign another different text accordingly to column B in column D.
So, I am looking for a command in which, using different text in Column B , I can assign bunch of different text in Column D.
Thank You
Hi, you didn't explain these extra conditions in your initial question. Thus, from my perspective, you can adapt my script on your own time. Currently, my answer does exactly as requested in your initial / original Question, and I will leave it there to avoid the creation of a messy thread. Good luck.