HERE_DOCUMENT
How to create a file on the fly


HERE_DOCUMENT contains examples which illustrate the use of "here documents".

A "here document" is a method for creating a small file as part of a job script. This is usually a convenience for dealing with situations in which a single job script is desired, but where the job script from time to time needs to "feed" small input files to other commands it invokes. A "here document" is a method of creating such a file by listing its contents as part of the script.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Source Code:

HERE_GCC_LOCAL is an example, to be run "locally", in which a tiny C program is created as a "here document" using the cat command, then compiled with GCC and executed.

HERE_GCC_MOAB is an example, to be run on a MOAB cluster, in which a tiny C program is created as a "here document" using the cat command, then compiled with GCC and executed.

HERE_GFORTRAN_LOCAL is an example, to be run "locally", in which a tiny FORTRAN90 program is created as a "here document" using the cat command, then compiled with GFORTRAN and executed.

HERE_GFORTRAN_MOAB is an example, to be run on a MOAB cluster, in which a tiny FORTRAN90 program is created as a "here document" using the cat command, then compiled with GFORTRAN and executed.

You can go up one level to the EXAMPLES page.


Last revised on 17 August 2012.