Perl pattern matching - greedy
Hi all,
I have a problem at the moment that has stumped me for a couple of days now...
I have a file containing public key for ssh, called authorized_keys2, containing :
ssh-dss xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxbbbbbbbbbbbbbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxx== root@servername
I want to create a perl one liner so that it will match only the 'root@servername' part of the file and returns it to me. Is this possible? Appreciate your help. I've tried to do it with awk and sed with no success.....
|