Add back base commands

This commit is contained in:
2023-12-09 19:54:20 -05:00
parent 5b654a5ff0
commit 6e8592b785
3 changed files with 55 additions and 0 deletions

16
src/tpop Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
#must have no arguments
if [ "$#" -ne 0 ]; then
echo "Usage:" $0
echo "Remove the last element of the stack and prints it"
exit 1
fi
if [ -z "${TODO_LOCATION}" ]; then
TODO_LOCATION="$HOME/.config/stackToDo/todo"
mkdir -p $HOME/.config/stackToDo
fi
tail -1 $TODO_LOCATION
sed -i '$ d' $TODO_LOCATION