Skip to content

Instantly share code, notes, and snippets.

@drushadrusha
Last active July 23, 2022 16:34
Show Gist options
  • Save drushadrusha/99abaeae1fa8447ea15f74cb0499cba1 to your computer and use it in GitHub Desktop.
Save drushadrusha/99abaeae1fa8447ea15f74cb0499cba1 to your computer and use it in GitHub Desktop.
#!/bin/bash
CYAN='\033[1;36m'
NC='\033[0m'
cd /Users/drusha/journal/
if [ "$1" = 'ls' ]; then
for filename in *; do
echo " "
echo "-------------------------"
echo -e "${CYAN}$filename${NC}"
echo "-------------------------"
echo " "
cat "$filename"
done
exit 0
fi
filename=$(date +'%d.%m.%y').md
nano $filename
git add *
git commit -m "update"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment