So I needed to Convert this First, Middle and last name in to Email id format.
Arranging First Name, Middle Name Last Name to email ID.
Converting a Upper case Letter case to Lower case in Vi Editor
Open the file name in vi and give this command to convert all uppercase to
lower case :
Solution
:%s/.*/\L&/
Replacing Double Space with Single Space
:%s/2space
Now use Awk Variables to list only first and last names in the files
awk '{print $1,$NF }' filename > outputfile.txt
Replacing space with dot
:%s/1space
Adding @wnsgs.com to Last line
cat file.txt | awk '{ print $0"@wnsgs.com" }' > newfile.txt
thats it !!!
No comments:
Post a Comment