WriteLine

WriteLine[stream,"string"]
writes , followed by a newline, to the specified output stream.

WriteLine[proc,"string"]
writes to an external process proc.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Open a file:

In[1]:=
Click for copyable input

Write a line into the file:

In[2]:=
Click for copyable input

Close the file:

In[3]:=
Click for copyable input
Out[3]=

Start the system shell process:

In[1]:=
Click for copyable input
Out[1]=

Write a command into the shell process:

In[2]:=
Click for copyable input

Read one line from the shell output:

In[3]:=
Click for copyable input
Out[3]=
Introduced in 2014
(10.0)