Help With isql in shell script

Hello

I am not able to get the isql output to temp_res file ... i have tried all the different combinations as shown below, but could not get anywhere .... Please Help

isql -S $serv_name -U $usr_name -P $pswd  -D $db_name -o temp_res << EOF1
select status from modset where modsetid=$mod_id
go
exit
EOF1

isql -S $serv_name -U $usr_name -P $pswd  -D $db_name << EOF1 > -o temp_res
select status from modset where modsetid=$mod_id
go
exit
EOF1

isql -S $serv_name -U $usr_name -P $pswd  -D $db_name << EOF1 > temp_res
select status from modset where modsetid=$mod_id
go
exit
EOF1

temp_path="/.../.../.../.../temp_res.txt"
isql -S $serv_name -U $usr_name -P $pswd  -D $db_name -o temp_path << EOF1 
select status from modset where modsetid=$mod_id
go
exit
EOF1

the problem may be due to "$mod_id". I suggest you to write the sql in a file and use -i option of isql.
hope this helps :slight_smile: