<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>4.7 Standard input or file, header records</TITLE> <META NAME="description" CONTENT="4.7 Standard input or file, header records"> <META NAME="keywords" CONTENT="GMT_Docs"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="GMT_Docs.css"> <LINK REL="next" HREF="node63.html"> <LINK REL="previous" HREF="node61.html"> <LINK REL="up" HREF="node33.html"> <LINK REL="next" HREF="node63.html"> </HEAD> <BODY bgcolor="#ffffff"> <!--Navigation Panel--> <A NAME="tex2html3502" HREF="node63.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html3496" HREF="node33.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html3490" HREF="node61.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html3498" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html3500" HREF="node258.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html3503" HREF="node63.html">4.8 Verbose operation</A> <B> Up:</B> <A NAME="tex2html3497" HREF="node33.html">4. General features</A> <B> Previous:</B> <A NAME="tex2html3491" HREF="node61.html">4.6 Usage messages, syntax-</A> <B> <A NAME="tex2html3499" HREF="node1.html">Contents</A></B> <B> <A NAME="tex2html3501" HREF="node258.html">Index</A></B> <BR> <BR> <!--End of Navigation Panel--> <H1><A NAME="SECTION001270000000000000000"></A> <A NAME="18509"></A> <A NAME="18510"></A> <BR> 4.7 Standard input or file, header records </H1> <A NAME="19211"></A> <A NAME="19212"></A> <A NAME="19213"></A> <A NAME="18514"></A> <P> Most of the programs which expect table data input can read either standard input or input in one or several files. These programs will try to read <I>stdin</I> unless you type the filename(s) on the command line without the above hyphens. (If the program sees a hyphen, it reads the next character as an instruction; if an argument begins without a hyphen, it tries to open this argument as a filename). This feature allows you to connect programs with pipes if you like. If your input is ASCII and has one or more header records, you must use the <B>-H</B> option (see Section <A HREF="node48.html#sec:header">4.4.4</A>). For binary table data no headers are allowed. ASCII files may in many cases also contain sub-headers separating data segments. These are called ``multi-segment files'' and requires a special option (typically <B>-m</B>); see Appendix <A HREF="node175.html#app:B">B</A> for complete documentation. <P> If filenames are given for reading, <A NAME="tex2html1220" HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> programs will first look for them in the current directory. If the file is not found, the programs will look in two other directories pointed to by environmental parameters (if set). These are <B>GMT_DATADIR</B> and <B>GMT_USERDIR</B>, and they may be set by the user to point to directories that contain data sets of general use. Normally, the first directory (or directories: add multiple paths by separating them with colons (semi-colons under Windows)) will hold data sets of a general nature (tables, grids), although a particular use is to make available large grids accessible via the supplemental programs <A NAME="tex2html1221" HREF="../man/grdraster.html"><I><B>grdraster</B></I></A><A NAME="19781"></A> or <A NAME="tex2html1222" HREF="../man/img2grd.html"><I><B>img2grd</B></I></A><A NAME="19786"></A>; see Appendix <A HREF="node160.html#app:A">A</A> for information about these supplemental programs. The second directory may hold miscellaneous data sets more specific to the user; this directory also stores <A NAME="tex2html1223" HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> defaults and other configuration files. Data sets that the user finds are often needed may be placed in these directories, thus eliminating the need to specify a full path to the file. Program output is always written to the current directory unless a full path has been specified. <P> <HR> <!--Navigation Panel--> <A NAME="tex2html3502" HREF="node63.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html3496" HREF="node33.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html3490" HREF="node61.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html3498" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html3500" HREF="node258.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html3503" HREF="node63.html">4.8 Verbose operation</A> <B> Up:</B> <A NAME="tex2html3497" HREF="node33.html">4. General features</A> <B> Previous:</B> <A NAME="tex2html3491" HREF="node61.html">4.6 Usage messages, syntax-</A> <B> <A NAME="tex2html3499" HREF="node1.html">Contents</A></B> <B> <A NAME="tex2html3501" HREF="node258.html">Index</A></B> <!--End of Navigation Panel--> <ADDRESS> Paul Wessel 2011-02-27 </ADDRESS> </BODY> </HTML>