Taking multline input from a user
Sep 6, 2014So I needed to take in a pasted stdin that was multiple lines. Using just read or any of the flags it provides don’t give a nice clean way to do this. However, using cat and sed, you can provide a few nice ways to allow a user to end the input stream and submit their entry: Ctrl+d: #!/bin/bash echo "Pipe in certificate, or paste and it ctrl-d when done" keyvariable=$(cat) Blank Line:
Continue reading ↦