I'm basing on Batch file to filter strings from text and replace... but in a single batch instead of multiple? but I'm still unable to understand how to do it.
I have an input txt flatfile with data stored in fixed columns. I need to use Windows batch to read line by line on this file. In a specific column, if the value is a specific one, I need to print its line in an output file. The input file doesn't have header so I don't have to worry about it.
In example, say it has 3 columns:
AAAA 1111 jjjjj
BBBB 2222 kkkkk
CCCC 1111 llll
I need to filter lines whose 2nd column is 1111
, so the new file must have:
AAAA 1111 jjjjj
CCCC 1111 llll
What's the code to make this filter and print to the output file?