How to pass parameter to bteq?

I am using below code to connect terdata and getting the query result in a file.Now i want to use same code for different tables,plz tell me how to pass table name as parameter.i tried using as below code but not working.

 
bteq < /download/viv/dev/ops/Scripts/ter.sh FLTORGTKR_ORG_etc..
 
.bteq
.LOGMECH ldap
.LOGON idwaa.card.XXyyzz.com/r525355,#Aadha2;
.Set Echoreq off
.Set Titledashes off
.Set Separator '|'
.Set Format off
.Set Null ''

.EXPORT REPORT FILE =/download/icdwaa/dev5/ops/Scripts/viv.dat
select count(*) FROM $1;
.EXPORT RESET 

.LOGOFF
.QUIT

Try using

select count(*) FROM '&1';