I know similar questions have been asked, but I am a novice, having just picked up Linux the last few months, and the particulars of my question have made me unable to adapt other solutions to my problem.
I wish to replace different strings in a single line with specific matched strings indicated in a CSV.
An example: file1:
file2.csv (two column csv):
1[&label, "1[&tag=2,label" 2[&label, "2[&tag=5,label" 3[&label, "3[&tag=3,label"
I would like to replace
1[&tag=2,label (etc...) in the single line file, such that I would end up with:
Note that the csv does not contain any entries for
[&label entries without an individual tag (the
1[&label ), but I still need those
[&label entries in the final output file.