4 ms·
Another rather useful use of `cat` is to make the input stream appear in a specific location withing another stream. e.g. My website [1] maker [2] uses `cat -`
by adityaathalye 3y ago
Another rather useful use of `cat` is to make the input stream appear in a specific location withing another stream. e.g. My website [1] maker [2] uses `cat -` to inject content into templates.
shite_template_common_default_page() {
cat <<EOF |
$(shite_template_common_header)
<main id="main">
$(cat -)
</main>
EOF
shite_template_standard_page_wrapper
}
[1] https://evalapply.org https://evalapply.org
[2] https://github.com/adityaathalye/shite?tab=readme-ov-file#templating-system https://github.com/adityaathalye/shite?tab=readme-ov-file#te...