Created
October 1, 2020 16:11
-
-
Save retrospectacus/7c756cfcffe155cca0bc1e90b2fa04c9 to your computer and use it in GitHub Desktop.
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 | |
tr=trigger | |
tr='==============_AUTOGENERATED_-_EDITS_BELOW_WILL_BE_CLOBBERED' | |
[ ! -f test ] && cat <<EOF >test | |
this | |
is a | |
trigger | |
test | |
some config is | |
probably here | |
EOF | |
day=$(date +%A) | |
cat <<EOF >data | |
this is | |
$day's data. | |
EOF | |
cat \ | |
<(awk "/$tr/{exit}{print}" test) \ | |
<(echo "$tr") \ | |
<(date) \ | |
<(uname -a) \ | |
data \ | |
> output | |
cat output | |
mv output test | |
# make external changes to ./test | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment