mercredi 1 avril 2015

Bash extract after substring and before substring

Say I have a string:



random text before authentication_token = 'pYWastSemJrMqwJycZPZ', gravatar_hash = 'd74a97f


I want a shell command to extract everything after "authentication_token = '" and before the next '.


So basically, I want to return pYWastSemJrMqwJycZPZ.


How do I do this?


Aucun commentaire:

Enregistrer un commentaire