Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- TITLE="$1"
- if [ -t 0 ]; then
- ### guessing, open to tty probably means no stdin and waiting for input
- TTY=$(tty)
- echo "$TTY done" | mail -s "$0 $TITLE $TTY" "$USER"
- else
- pee 'fold --spaces | tr "\r\n" "\275\276" | tr -d "[:cntrl:]" | tr "\275\276" "\r\n" | pee "head -n 100; printf \".%.0s\" {1..80}; echo" "tail -n 100" | mail -s "$0 $TITLE" "$USER"' 'cat -'
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement