How can I modify this so that execution will stop after first match
You can do:
perl -ne'/(data)/ && print $1 and last' file.txt
In reply to Re: Break one liner command line script after first match
by 2teez
in thread Break one liner command line script after first match
by saumitra121
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |