Hi
why not just exiting after printing the matched line?
UPDATE: perl -ne'/(data)/ && print($1) && exit' file.txt
McA
In reply to Re: Break one liner command line script after first match
by McA
in thread Break one liner command line script after first match
by saumitra121
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |