#!/bin/bash # REQUIRES: # coreutils # bash # $HOME # todo: simple todo script todo_file="$HOME/.local/share/todo" if [[ ! -f "$todo_file" ]]; then touch "$todo_file" fi if [[ "$1" == "-r" ]]; then sed -i -e "$(($2+1))d" "$todo_file" elif (($#)); then printf "%s\n" "$*" >> "$todo_file" fi nl -v 0 -w 2 -n 'ln' "$todo_file"