If your input text does not contain greater/lessthan symbols, then this will work:
It also depends on the fact that there are not any tabs after the third one.
sed 's/.*\t/&</; s/HELLO/&>/; s/<.*>//'
It adds "<" after the last tab and ">" after the first hello, then deletes everything between.
Right -- I initially ran into that when pasting your example into a file to test locally; had to convert them to tabs.
Ok, it might be that '\t' isn't recognised by your awk as TAB. Try running the original sed, but instad of using '\t' actually type a TAB there. If that doesn't do it, I'm not sure what is going on.
Hello, is it possible to do with sed ? Because it comes from a stream (tshark) and I have already a pipe with some sed cmds. If I do another pipe, it will create a buffer.
---------- Post updated at 01:01 PM ---------- Previous update was at 12:47 PM ----------