#!/usr/bin/env bash > /tmp/buf while IFS= read -r line;do echo "$line" >> /tmp/buf echo "$line" done