I'm using GNU Sed 4.2.1. I'm trying to replace the second field in the following line (the password in /etc/shadow). Awk
is not an option.
username:P@s$w0rDh@$H:15986:0:365::::
I've tried
sed -i 's/\(^[a-z]*\):.*?:/\1:TEST:/'
but nothing. I've tried many variations but for some reason I can't get it to only match that field. Help?