EndOfBuffer

EndOfBuffer
is a symbol that represents the end of currently available data in the buffer for a process or stream.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Start the system shell process:

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

Write some commands into the shell:

In[2]:=
Click for copyable input

Read the partial output from the process even before it is finished. ReadString waits until the system shell finishes unless EndOfBuffer is used:

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

Start the system shell process:

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

Read all initial output; depending on the operating system and shell, this can result in an empty string:

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

Write the "date" command in the shell:

In[3]:=
Click for copyable input

Read the date command output:

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

Write an "echo" command in the shell:

In[5]:=
Click for copyable input

Read the echo command output:

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

Write another command on the shell, then exit; ReadString waits until the process finishes by default:

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