virtual-appliance/scripts/print
Albert Hopkins 339b3dd2e3 scripts: rename echo to print
This should have happended in a previous submit.  Why didn't it?
2018-12-01 16:04:53 -08:00

22 lines
307 B
Python
Executable File

#!/usr/bin/env python
import sys
TTY = sys.stdout.isatty()
write = sys.stdout.write
write('\n')
if TTY:
write('\x1b[') # escape, left-bracket
write('1;31m') # bold red
write(' '.join(sys.argv[1:]))
if TTY:
write('\x1b[') # escape, left-bracket
write('0m') # reset
write('\n')