This repository has been archived on 2023-12-10. You can view files and clone it, but cannot push or open issues or pull requests.
stackToDo/tpop
2021-10-22 11:00:53 -04:00

16 lines
317 B
Bash
Executable File

#!/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
#make correct directories
mkdir -p ~/.config/stackToDo
touch ~/.config/stackToDo/todo
tail -1 ~/.config/stackToDo/todo
sed -i '$ d' ~/.config/stackToDo/todo