I am trying to find a way to use a variable in my shell (Korn) in a simple select statement in sqlplus.

For example:

$ SHELLVAR=10
$ sqlplus '/ as sysdba'
SQL> select name from v$archived_log
2> where seqeunce# = $SHELLVAR
3> /

This is basically what I want to do. In the way is it written here, I get an error from SQLPLUS.

Is there any way to use the value of shell variable in sqlplus?