I'm trying to produce "hits" found in one file to another using sed but i miss some parts of the substitution text and i cant find out why it wont work.
By using this command:
sed 's/\x1B[[0-9;]*[JKmsu]//g;s/.*(0x\([A-Za-z0-9]\+\)\.0x\([a-z0-9]\+\).*/(<Aug>Oct\2\1? Feb:Sep) -/g;s/.*(0x\([a-z0-9]\+\).*/(<Aug>Oct\1? Feb:Sep) -/g;s/.*}/(<Aug>Oct? Feb:Sep) -/' q1data.txt > 1.txt && cat 1.txt
i'm trying to keep some of the text and strip away text that i don't need. However on some lines it misses the text that i'm trying to grep.
Using this 2 files with the command above i should be able to get a correct result as i grep the red parts in the text but it fails at some lines for a reason unknown to me. The result from file 1 should be the same as q1hits.txt. (note that the files need to be opened in the terminal in order for the color scheme to work and the format) q1data, q1hits