Hands-on task
This task is step 31 of the course “Regular expressions”
Extract the value without the key
In /var/log/api.log some lines contain a token=<value> field. Collect only the token values (without token=), one per line, into /root/tokens.txt. Lines without a token must not appear in the result.
What you'll practise:
- grep -P
- PCRE
- lookbehind
- (?<=...)
- grep -o