I'm currently learning CentOS and need some assistance if possible. I have a file UserNameList.lst, which is used to generate user accounts. The content of the file is below
Josh, Adams, Joshadams@gmail.com
Henry, Ford, HFord@gmail.com
I need to output a txt file which looks like this. (basically combining column 2 and 1 to make a single column)
Adams Josh
Ford Henry
I tried using the command
cut -d "," -f 1 >> Last.txt
cut -d "," -f 2 >> First.txt
paste First.txt Last.txt >> full
which outputs
Adams Josh
Ford Henry
Is there a simpler way to do this?