misc helper scripts
This commit is contained in:
parent
16cf71e592
commit
00b0b76637
3 changed files with 78 additions and 0 deletions
17
home/bin/executable_inbox
Normal file
17
home/bin/executable_inbox
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#!/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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue