#!/usr/bin/env tsh

printenv TES >/tmp/tes-$$
if $1X != -vX goto NotVerbose
	fd2 -e echo -n 'TES=' ; fd2 -e cat </tmp/tes-$$ ; cat </tmp/tes-$$
	goto Done
: NotVerbose
	cat </tmp/tes-$$
	: fallthrough
: Done
	rm -f /tmp/tes-$$
exit

:
: "  @(#)$Id: tes,v 1.5 2018/12/15 07:09:42 jneitzel Exp $  "
:
: "  The author of this file, J.A. Neitzel <jan (at) etsh (dot) nl>,  "
: "  hereby grants it to the public domain.                           "
:
: "  Print out TES (short for TSH_EXIT_STATUS) from the environment.  "
: "  Do so verbosely if `-v' is specified.                            "
:
: "  usage: tes [-v]  "
:
