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/tpush

22 lines
407 B
Plaintext
Raw Normal View History

2021-10-22 15:00:53 +00:00
#!/bin/bash
#must have an argument
if [ "$#" -eq 0 ]; then
echo "Usage:" $0 "[STRING TO PUT ON STACK]"
echo "Pushes the given string to the top of the todo stack"
exit 1
fi
str="'$*'"
if [ -z "$str" ]; then
echo "Must provide a non empty argument"
exit 1
fi
#make correct directories
mkdir -p ~/.config/stackToDo
touch ~/.config/stackToDo/todo
echo $str >> ~/.config/stackToDo/todo