the only way I know to do this is to use a script with EOF as you said, but I do not think there is another way to do this since you cannot interface your shell and sqlplus using another way :/