#!/bin/bash while IFS= read -r email; do username="${email%@*}" echo "${email}:{PLAIN}${username}" done < /tmp/users.txt