Last active
August 29, 2015 14:24
-
-
Save bamos/c8a869d8c8cd8943e013 to your computer and use it in GitHub Desktop.
Missing first character when piping script into mutt with cron
This file contains hidden or 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
# Manually running script | |
test1: test Tue Jul 7 09:41:01 EDT 2015 | |
test2: test Tue Jul 7 09:41:01 EDT 2015 | |
email: test Tue Jul 7 09:41:01 EDT 2015 | |
# Running script in cron | |
Entry: * * * * * /home/bamos/tmp/test.sh | |
test1: test Tue Jul 7 09:41:01 EDT 2015 | |
test2: test Tue Jul 7 09:41:01 EDT 2015 | |
email: est Tue Jul 7 09:41:01 EDT 2015 | |
# Running script in cron with all of my shell's `env` at the beginning | |
Entry: * * * * * /home/bamos/tmp/test.sh | |
test1: test Tue Jul 7 09:41:01 EDT 2015 | |
test2: test Tue Jul 7 09:41:01 EDT 2015 | |
email: est Tue Jul 7 09:41:01 EDT 2015 |
This file contains hidden or 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
#!/bin/bash | |
echo "test $(date)" | mutt [email protected] -s "test" | |
echo "test $(date)" > /tmp/test1 | |
echo "test $(date)" | cat > /tmp/test2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment