grep to get content
Assume i have a file t1.txt
<div class="content"> main </div> <div class="data"> 100 </div>
If i run
grep -o "content.*" t1.txt
it will return
content"> main </div> <div class="data"> 100 </div>
How can i grep the text by the 1st encountered </div>? i want to get
content"> main </div>
Thanks!
No comments:
Post a Comment