How to pass uername and password as parameters from a unix shell script to a Fasst Export script?

Database

How to pass uername and password as parameters from a unix shell script to a Fasst Export script?

I'm in need of passing username and password from a unix shell script into a Fast Export script. I'm curently using .RUN FILE option to store the username and password in an external file and use that file in the Fast Export script.

My main unix shell script (FastEx.sh) is as follows:

#!/bin/bash

uid=$1
pwd=$2

echo $uid
echo $pwd

#echo ".LOGON servname/$1,$2 ;" > uidpwd.txt

fexp < FEXCols.txt

And my Fast Export script (FEXPCols.txt) is as follows:

.ACCEPT user_name, pass_word FROM file FastEx.sh uid, pwd;

.LOGTABLE dbname.lgtbl;

/*.RUN FILE uidpwd.txt*/

.LOGON servname/user_name,pass_word;
DATABASE dbname;

.BEGIN EXPORT;
.EXPORT OUTFILE original_table.csv FORMAT TEXT MODE RECORD;

SELECT * FROM dbame.table_name

.END EXPORT;

.LOGOFF;

I'm trying to use ACCEPT command to pass parameters from unix shell script to Fast Export script and it's always saying as error:

Input error in the ACCEPT command at "uid,"

How do I pass parameters collected into a unix shell script using $1, $2 into a Fast Export script that is being called in the same unix shell script?

I'm really stuck here. And I'm a complete newbie to TD. Please help me out.

Thank you very much.

Tags (1)