<< Eof ?
What is the usage of << EOF and EOF in the following block,
sqlplus "/ as sysdba" <<EOF startup EOF |
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... |
This is a script to login to oracle instance and the startup the database.
|
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.
|
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 |
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. |