%%% Taco Hoekwater: 4 endless lines
The end of a line in an \type{\input}-ed file normally creates a space in the output,
\TeX{} appends a character with the current value of \type{\endlinechar} to each that
character is later converted to a space.

\beginverbatim
\immediate\write18
  {echo -n Y >bla.tex}
X\input bla Z
% gives XY Z
\endverbatim

If you do not want that space, for instance because you want to typeset the
of the file in-line, then there are a number of options. Two are usable
writing, and two others during type reading.
\medskip

1. Writing a percent sign to the end of the line works

\beginverbatim
\immediate\write18
  {echo -n Y\letterpercent >bla.tex}
X\input bla Z
% gives XYZ
\endverbatim

2. Another option is ending the written line with \type{\relax} or a similar 
space-gobbling command.

\beginverbatim
\immediate\write18
  {echo -n Y\letterbackslash\letterbackslash relax >bla.tex}
X\input bla Z
% gives XY\relax Z
\endverbatim

3. Temporarily setting \type{\endlinechar} to an impossible value like -1 is a possibility

\beginverbatim
\immediate\write18
  {echo -n Y >bla.tex}
X{\endlinechar=-1 \input bla }Z
% gives XYZ
\endverbatim

4. Changing the catcode of the current \type{\endlinechar} to 9 (ignored) also works

\beginverbatim
\immediate\write18
  {echo -n Y >bla.tex}
X{\catcode'\^^M=9 \input bla }Z
% gives XYZ
\endverbatim

