#!/bin/bash
# File: /usr/bin/plecho
# Author: bgstack15@gmail.com
# Startdate: 2015-11-20
# Title: Piped Log Echo
# Purpose: Prepends server, timestamp, and user to data including what is piped in
# Package: bgscripts
# History: 2015-12-01 updated to work with stdin no matter ssh or not
#    2016-08-03 made more portable, but the read command depends on /bin/bash
#    2021-05-13 rewrite to use ts from moreutils, v1.5.4
# Usage: echo "bar" | plecho "foo"
# Reference: /test/sysadmin/bin/bgstack15/args/input.sh 2014-05-26a
# Improve: 

# template: [2014-07-08 14:43:45]picard@enterprise "$@"
TZ=UTC ts "[%FT%TZ]${USER}@${HOSTNAME}:${@+ $@}"
