![]() |
Printing only from the matching exp to the end of line?
Hello there! :)
Is there a way to print only from the matching expression to the end of line ? Example, ( exp: /DC/ ) OU=TI,OU=Clientes,OU=TI-RIO,OU=Unidades,DC=crp,DC=pes,DC=biz Output should be: DC=crp,DC=pes,DC=biz Thanks! hippie :) |
:
awk ' {if ( $0 ~ /DC/) print substr($0,index($0,"DC")) }' <filename>sample run: :
original file: |
| All times are GMT -5. The time now is 1:12 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC