mirror of
https://github.com/leahneukirchen/mblaze
synced 2024-11-11 13:10:32 +00:00
13 lines
262 B
Bash
Executable File
13 lines
262 B
Bash
Executable File
#!/bin/sh -e
|
|
# msetseq [-a] - store/append stdin as santoku seq (can be used as filter)
|
|
|
|
: ${MAILMAP:=~/.santoku/map}
|
|
|
|
if [ "$1" = -a ]; then
|
|
cat ${MAILMAP} - >"${MAILMAP}-"
|
|
else
|
|
cat >"${MAILMAP}-"
|
|
fi
|
|
mv "${MAILMAP}-" "${MAILMAP}"
|
|
[ -t 1 ] || cat "${MAILMAP}"
|