diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-05 19:24:42 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-05 19:24:42 +1200 |
commit | 54ad424b8ce977e6f818dfb283ad0777e7ec8094 (patch) | |
tree | dd5dc73db0317f3932e9929be58beefa649cbb6e /bin/msc.sh | |
parent | Merge branch 'hotfix/v8.28.2' (diff) | |
parent | Update dotfiles(7) manual page (diff) | |
download | dotfiles-8.29.0.tar.gz (sig) dotfiles-8.29.0.zip |
Merge branch 'release/v8.29.0'v8.29.0
* release/v8.29.0:
Update dotfiles(7) manual page
Switch undoskip.vim to use globs
Attempt to imitate 'backupskip' pats in undoskip
Revert "Add /tmp to 'backupskip'"
Add /tmp to 'backupskip'
Add /usr/tmp to the list of undoskip paths
Break undoskip patterns into linewise list
Use msc(1df) output in tmux status
Add msc(1df)
Add Bcc and terminating columns to Mutt pager hdrs
Correct and refine explanation of 'thesaurus'
Working on rewording vimrc
Diffstat (limited to 'bin/msc.sh')
-rwxr-xr-x | bin/msc.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/msc.sh b/bin/msc.sh new file mode 100755 index 00000000..feb39b14 --- /dev/null +++ b/bin/msc.sh @@ -0,0 +1,12 @@ +# Crudely but quickly count mail in the user's inbox, if we can find it +username=$(id -nu) +if [ "$#" -eq 0 ] ; then + set -- "$MAIL" /var/mail/"$username" /var/spool/mail/"$username" +fi +for path ; do + [ -e "$path" ] || continue + grep -ch -- '^From ' "$path" + exit +done +printf >&2 'Couldn'\''t find user mail spool; provide it as an argument...?\n' +exit 1 |