17 lines
263 B
Bash
17 lines
263 B
Bash
#!/usr/bin/env bash
|
|
|
|
file=~/notebook/todo.xit
|
|
|
|
if [[ ! -f "$file" ]]; then
|
|
echo "$file is missing"
|
|
exit 0
|
|
fi
|
|
|
|
content=$(sed -n '/^Inbox$/,$ p' "$file" | tail -n +2)
|
|
|
|
if [[ -z "${content// }" ]]; then
|
|
echo "Inbox is empty"
|
|
else
|
|
echo "$content"
|
|
fi
|
|
|