Switching from a single variable to multiple

view full story

http://www.unix.com – I apologize in advance if someone has answered this question before, but I am not sure even what to search for here. I have this script for backing up DB2 databases and it works fantastically if there is only on database in the config. My problem is that I have a business intelligence server that has multiple DB's in the directory and the script just falls over. This is the code that performs the work: Code: while read inst ; do         db=`su - $inst "-c db2 list db directory" | grep -p Indirect | grep -v HA | sed -n 's!Database alias *= \([A-Z]*\)!\1!p'` & (HowTos)