Append input to file from script
Posted on 2008-06-24
Previously you all helped me create a script to add a user with some custom home folder stipulations. Now I'd like to modify the script to append $2 to /etc/ftpusers.
I've commented out the line I hoped would work for this purpose, but it overwrites the ftpusers file, instead of appending. Do I need to use cat instead?
if test $# -eq 0
echo "Usage: ./mkuser firstname_lastname_location userid"
#echo $2 >> /etc/ftpd/ftpusers
useradd -d /usr/igi/avante95/flodata/live/LIVE.DATA -c $1 $2