I need to match a line in an inputted text file string and wrap that captured line with a character for example.
For example imagine a text file as such:
<
Your lines probably have newline characters. You need to handle this one way or another. For example, this works fine for me:
$ ruby -ne 'puts "X#{$_.chomp}X"' /tmp/corpus XtestX XfooX XtestX XbarX