virtual-appliance/scripts/echo

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')