Replay previous console text Create a script that, when run from a console, will display the text already in the console, prior to running.

Challenge


How will the winner of the challenge will be determined?


  The golf with the shortest length (in bytes) will win. 



Example Input and Output

Input:
(Shown is Windows)

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\Users\CSS&gt;dir
 Volume in drive C has no label.
 Volume Serial Number is B0A1-E768

 Directory of C:\Users\CSS

11/30/2016  07:18 PM    &lt;DIR&gt;          .
11/30/2016  07:18 PM    &lt;DIR&gt;          ..
12/01/2016  04:45 PM    &lt;DIR&gt;          .android
10/25/2016  12:41 PM    &lt;DIR&gt;          .atom
11/29/2016  05:52 PM    &lt;DIR&gt;          .dnx
10/27/2016  09:34 PM               148 .gitconfig
11/28/2016  03:02 PM    &lt;DIR&gt;          .MemuHyperv
11/29/2016  05:55 PM    &lt;DIR&gt;          .nuget
12/01/2016  04:42 PM    &lt;DIR&gt;          .oracle_jre_usage
10/26/2016  11:37 PM    &lt;DIR&gt;          .ssh
12/04/2016  06:20 PM    &lt;DIR&gt;          .VirtualBox
11/29/2016  12:56 PM    &lt;DIR&gt;          .vscode
11/28/2016  03:53 PM             8,528 2016-11-28-20-44-28.000-VBoxSVC.exe-2608.log
11/28/2016  05:09 PM    &lt;DIR&gt;          Andy
11/23/2016  10:01 AM    &lt;DIR&gt;          Contacts
12/11/2016  11:16 PM    &lt;DIR&gt;          Desktop
11/30/2016  07:35 PM    &lt;DIR&gt;          Documents
12/11/2016  01:43 AM    &lt;DIR&gt;          Downloads
11/23/2016  10:01 AM    &lt;DIR&gt;          Favorites
11/22/2016  07:23 PM               409 fciv.err
11/22/2016  07:21 PM               266 hi
11/23/2016  10:01 AM    &lt;DIR&gt;          Links
11/22/2016  04:28 PM                15 me.txt
11/28/2016  03:08 PM    &lt;DIR&gt;          Music
10/25/2016  12:44 AM    &lt;DIR&gt;          OneDrive
12/09/2016  05:57 PM    &lt;DIR&gt;          Pictures
11/23/2016  10:01 AM    &lt;DIR&gt;          Saved Games
11/24/2016  08:56 PM               151 search.bat
11/23/2016  10:01 AM    &lt;DIR&gt;          Searches
11/07/2016  11:00 AM                11 t.bat
11/24/2016  08:55 PM                93 update.bat
11/28/2016  03:08 PM    &lt;DIR&gt;          Videos
               8 File(s)          9,621 bytes
              24 Dir(s)  152,887,300,096 bytes free

C:\Users\CSS&gt;




Output:

The script must display something like the text above, in the sense that it must display exactly what was in the console before the script was called.
MacOS terminal, 84 bytes

osascript -e 'tell app &quot;System Events&quot; to keystroke &quot;ac&quot; using command down'
pbpaste

Simple select-all then copy-and-paste.