Use standart *NIX shell like bash,ch.
Or you cah download MSYS from
www.sourceforge.com
here is an example:
#!/bin/bash
echo Enter username: ; read USERNAME;
db2 connect to test user ${USERNAME};
echo Enter tablename: ; read VAR;
db2 "select * from syscat.tables where tabname='${VAR}'"