another possible BASH way - create a helper function which processes the stdin with read command and then prints extra line(s):
$ function append_lines(){ local data; while read -r data; do echo -en "$data"; done; echo "$*"; } $ echo "[`date `]" date | append_lines " +suffice_;line1" " ++line2" " +++line_3" [Mon Aug 21 16:00:37 CEST 2023][ +suffice_;line1 ++line2 +++line_3] $ echo "750/12.5" | bc | append_lines "/24" | bc 2 where
while read -r data; do echo -en "$data"; done;- just passes the stdin (pipe) through. remove the-enmodifier to print separate input lines.echo "$*";- prints all arguments of append_lines() to stdout