Shell.PeekOutputText
--------------------

Peeks into output buffer.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Shell](component_Shell.md) | [7.5](newinversion75.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No |

MBS( "Shell.PeekOutputText"; ShellRef { ; Encoding } ) 

**MBS**( **"Shell.PeekOutputText";** /\* Peeks into output buffer. \*/  
**$ShellRef**; /\* The reference number from the shell.e.g. $shell \*/   
**$Encoding**) /\* Optional; The text encoding for result.e.g. UTF8 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| ShellRef | The reference number from the shell. | $shell |  |
| Encoding | The text encoding for result.   Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the [FAQ](https://www.monkeybreadsoftware.com/filemaker/faq.shtml). | UTF8 | Optional |

### Result

Returns text or error.

### Description

Peeks into output buffer.  
Returns data in buffer without removing it.  
  
You need to call [Shell.ReadOutputText](ShellReadOutputText.md) later to actually read the data and remove it from the buffer.  
The plugin internally queries [Shell.AvailableBytesOutput](ShellAvailableBytesOutput.md) to see how much to read and return.  
### See also

- [Shell.AvailableBytesOutput](ShellAvailableBytesOutput.md)
- [Shell.ReadOutputText](ShellReadOutputText.md)

This function checks for a license.

Created 11st November 2017 , last changed 22nd April 2021

  
[Shell.PeekErrorText](ShellPeekErrorText.md) - [Shell.ProcessIdentifier](ShellProcessIdentifier.md)

[HTML Version](ShellPeekOutputText.shtml)