permanent redirection of standard input

while running a user inter-active program
how can we get the commands from a
file instead of the user?

is there anyway to permanently redirect content
of a file to standard input?

You can do :

my_program < input_file

If you want the redirectition permanent within your script:

exec 1<input_file

Jean-Pierre

thanks for your reply but it didnt solve my problem.
let me explain via example:

i am running sqlplus, then in the sql prompt i am running some queries.

sqlplus user/pasw@DATABASE
SQL> select * from my_table1;
SQL>

but what i want to do is to feed these query statements to sqlplus
from a file.
an example file content can be like this:
select * from my_table1;
select * from my_table2;
select * from my_table3;

qry=`cat somefile`
sqlplus -s user/passwd@mydb<<EOF
spool myfile.lis
$qry
exit;
EOF

Two solutions to use with a file containing sql code.
First :

sqlplus user/pasw@DATABASE < sql_file

Second using sqlplus specific syntax :

sqlplus user/pasw@DATABASE @sql_file

Jean-Pierre.

what is spool?
i dont think that my OS supports a command named spool.
can u explain about it?

'spool' is an sql command. Any commands that lie between <<EOF and EOF are not interpreted by shell, but sent in to the sqlplus command for which the input is redirected.