Take a text file full of usernames with some blank lines, some comma-separated lists of usernames on single lines, and some cases of one-username-per-line, and convert it into a list of usernames, one on each line, with no blank spaces.

sed -r '/^$/d;s/([[:alnum:]_]+),[[:blank:]]*/\1\n/g' usernames.txt