I want to grep a file that stops at the first match, example:
${A57}${A17}${A23}${A20}${A35}${A57}${A33}${A24}${A38}${A38}${A24}${A17}${A57}${A33}${A23}${A38}${A18}${E52}${A28}${A28}${A28}${A25}${A38}${A22}${A50}${A30}${A57}${A37}${A18}${A44}${A15}${A28}${A29}${A29}${A29}${A29}${A14}
When I use grep -o "${A57}.\*${A29}${A14}"
I obtain this output:
${A57}${A17}${A23}${A20}${A35}${A57}${A33}${A24}${A38}${A38}${A24}${A17}${A57}${A33}${A23}${A38}${A18}${E52}${A28}${A28}${A28}${A25}${A38}${A22}${A50}${A30}${A57}${A37}${A18}${A44}${A15}${A28}${A29}${A29}${A29}${A29}${A14}
Now my question is how can I stop grep with the first match of '${A57}' so that I have this output:
${A57}${A37}${A18}${A44}${A15}${A28}${A29}${A29}${A29}${A29}${A14}