I have 24 directories in a specific directory (main_directory). Each 24 directory have a text file whose name is DATA.txt.
I need to use grep command to extract below specific pattern for each text file;
2* x = 3800689.6402 y = 882077.3636 z = 5028791.2953
2* x = part is constant for all DATA.txt. The other numeric numbers are variable. I need to extract above line for each DATA.txt and save them into another text file. Which script I can use for this process?