well, to provide a more in depth example of what i was hoping to acheive:
The script would perform the following, in order...
# cd /home/interworx/bin/
# run listdomains.pex which returns domains set up on server.
# output from that tool is as follows
# lfguildn lf-guild.net
# domain2 domain2.com
$account = lfguildn
$domain = lf-guild.net
# start loop on each line from listdomains.pex
# run backup.pex which backs up domain information from host control panel on each domain.
# scp partial backup .tar.gz from /home/$account/$domain/iworkx-backup/*{$date}.tgz
#perform rsync of HTML data from web directory
#make backup.hostname:~/webdata/$account/html directory if not exist
#rsync -av /home/$account/$domain/html/
backup.user@backup.hostname:~/webdata/$account/html/
The end goal is to have a tool that can be used to back up any dedicated server that one has leased at Sagonet.com and uses the Interworx Control Panel.
The only thing i cant figure out is how to to loop, line by line, on the output of a command in bash scripting.
I could write this as a php tool (or perl), but i'd rather use straight bash to make it simple and fast.