The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Поиск:  Каталог документации

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]



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру