Hi,
as you showed it with your solution: Be aware of the subtle difference between:
perl -ne'/(data)/ && print $1 and last' file.txt perl -ne'/(data)/ && print $1 && last' file.txt
That may bite someone (by the way: I was bitten ;-) )
McA
In reply to Re^2: 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: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |