Original file contains email addresses in the following format:domain.com\first.lastnameI have used sed to replace the backslash with an @ sign.I've tried various suggestions to swap the domain.com and first.lastname fields.sed 's/\(.*\) \@ \(.*\)/\2 - \1/' memberfilesed -e 's/\(.*\)\s\(.*\)/\2 \1/' memberfilesed -r 's/([a-zA-Z0-9]+) \- ([a-zA-Z0-9])*/\2 \- \1/' memberfileAll of the above just display domain.com@first.lastname...I'm very green to sed!
How do I swap two fields separated by backslash and output them separated by an at sign?
text processing