Posted on May 1, 2019May 22, 2019 by adminHow to redirect stdin to file in bash From Stack Overflow echo "$(</dev/stdin)" > /tmp/file Terminate your input with ENTER ctrl+d