Created
May 6, 2020 16:01
-
-
Save snown/83caa161cb655412d6fe8ae9061c05cf to your computer and use it in GitHub Desktop.
Wrapper around printf to take in a heredoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function here_printf { | |
local format=${1:-"%b\n"} | |
local text | |
read -r -d '' text | |
printf "${format}" "${text}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment