i have text file bak.txt
following content:
^[[34minfo^[[0m[0000] engine version 1.11.1-cs1 compatible ^[[34minfo^[[0m[0000] detected local components of ucp instance h7lq:wkr5:g2px:4f3v:jq47:wcig:jv4w:v6se:4wmr:tlzn:xywh:mieq ^[[31mfata^[[0m[0000] re-run command "--id h7lq:wkr5:g2px:4f3v:jq47:wcig:jv4w:v6se:4wmr:tlzn:xywh:mieq" or --interactive confirm want upgrade ucp instance.
i trying grep ucp instance
value bak.txt
file using following command:
grep -po '(?<=instance=)[^"]*' bak.txt
it not working. please suggest correct way.
try grep
:
grep -op '(?<=instance )[^"]+' bak.txt