Instead of removing duplicate words using regular expression, how do I duplicate a word? My case: I have a list of emails that need to be turn to SQL queries.
[email protected]
[email protected]
[email protected]
To:
mysql -e "select * from users where email='[email protected]" > /tmp/[email protected]
mysql -e "select * from users where email='[email protected]" > /tmp/[email protected]
mysql -e "select * from users where email='[email protected]" > /tmp/[email protected]
So how do I duplicate the email in every line?
Note: Each of this query will return more than one row, that's why I'm doing each query individually.