Attach words horizontally using shell scripting

To paste contents of two files horizontally, paste command can be used.
Create a file called cmd with the following content:
# cat cmd
/usr/sbin/useradd
/usr/sbin/useradd
/usr/sbin/useradd

Create another file called newusers
# cat newusers
tom
dick
harry

Now run the following command
# paste -d ” ” cmds newusers > add.sh

The -d ” ” seperates the contents by single space insetad of a tab. Check the final output
# cat add.sh
/usr/sbin/useradd tom
/usr/sbin/useradd dick
/usr/sbin/useradd harry

Written by actsupp-r0cks