Документ взят из кэша поисковой машины. Адрес оригинального документа : http://comet.sai.msu.ru/UNIXhelp/scrpt/scrpt2.7.2.html
Дата изменения: Fri Jan 17 12:43:20 1997
Дата индексирования: Tue Oct 2 01:05:52 2012
Кодировка:

Поисковые слова: п п р р р п п п ф ф ф ф ф ф ф ф
Including text in a shell script

Including text in a shell script

Text can be included in the shell script by using a here document, a special form of input redirection.

The << symbol is used to indicate that text should be read up to a given mark. For example:

   #!/bin/sh
   # this script outputs the given text before it runs
   cat << EOF
   This shellscript is currently under development, please
   report any problems to Danny (danny@cornflake.ed)
   EOF
   exec /usr/local/test/bin/test_version

The text is read from the script until a pattern is found which matches that after the << symbol; execution then proceeds as normal.


[Home] [Search] [Index]