would need to wrap the env variable in quotes for that to work
Code:
make_sql.sh:

#!/bin/bash
echo "
spool proc.log
connect user/password@db
begin
proc($e2DefaultEnv);
end;
/
spool off
exit
" > test.sql
sqlplus /nolog @test.sql