LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   << Eof ? (https://www.linuxquestions.org/questions/linux-software-2/eof-94188/)

sikandar 09-18-2003 11:09 AM

<< Eof ?
 
What is the usage of << EOF and EOF in the following block,


sqlplus "/ as sysdba" <<EOF
startup
EOF

DrOzz 09-18-2003 11:16 AM

well i don't know what the actual command is for, but i would assume the first part will issue that command until the end of file and then when it reaches it, it then issues startup, and then the next one says that you reached the end of the actual file...
but that is just an assumption as i don't know what it is that you actually posted...

sikandar 09-18-2003 11:19 AM

This is a script to login to oracle instance and the startup the database.

acid_kewpie 09-18-2003 11:22 AM

well it says that bash should pipe in the text between the two EOF's until it recieves the EOF (end of file) string itself, it's just a simple way of inputting a load of commands automatically.

cnjohnson 09-18-2003 11:26 AM

If you want to try this for yourself to see how it work, get to a command line and type

cat <<EOF

Then type, say, 5 lines with whatever you want. Make the 6th line the three letters EOF

See what happens. This is a really cool dimension to shell scripts.

Cheers--
Charles

sikandar 09-18-2003 11:39 AM

What I got understanding that the "startup" has to be executed in the sqlplus window so to pass this parameter this technique is used. Secondly we may say it a loop?


All times are GMT -5. The time now is 01:08 PM.