Hello Folks,
I use this sed line to search and print a specific string in multiple lines with a bunch of strings on each:
sed -n '/[A-Z][0-9]\{5,\}/s/^.*\([A-Z][0-9]\{5,\}\).*$/\1/p' job_details.txt
-> Output Sample:
B08619
However, I'm having a hard time printing multiple patterns from a line.
Cat job_details.txt
86,blah blah blah, B08619,drive index 10, blah blah blah...
Desired Output: (including comma)
86, B08619, drive index 10
Please help!
Thanks in advance.
59626