I need a command in Unix to look for a pattern in specific columns in a fixed length file and output the entire line to a different file.
2345abcdef450022677 1234sdfght350022677 3456abcdef350022677
I need extract the lines if column 5 to 10 = abcdef and column 15 to 16 = 22.
I want the output file to have the following data.
I can use the cut command with grep to find the pattern but not sure how to output the entire line.