Skip to content

Instantly share code, notes, and snippets.

@echristopherson
Last active September 22, 2023 03:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save echristopherson/1207345097619c87419c4928e9d6587b to your computer and use it in GitHub Desktop.
Save echristopherson/1207345097619c87419c4928e9d6587b to your computer and use it in GitHub Desktop.
"Print" a file from a computer emulator by having the emulator pipe the print output to this script, which is supposed to put it in a file on the host filesystem, with a date/timestamp in its filename. The script takes one argument: the path to put the output file in.
$timeStr = $args[0] + '\' + [DateTime]::UtcNow.ToString('yyyy-MM-dd-HHmmss') + '-utc.txt'
$input |Out-File -FilePath $timeStr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment