I have a file with lines:
username="user1" email="vova.tupkin@msn.com"
I need to take the username from the email address and replace the username value with it,
so the end result will be:
username="vova.tupkin" email="vova.tupkin@msn.com"
I was thinking in this direction:
#!/bin/bash
while read LINE; do
FUN=$(awk -F """ '{ print $2}')
RUN=$(awk -F """ '{print $4}' | awk -F "@" '{print $1}')
sed 's/$FUN/$RUN/g'
done < test.file