Added notes.sh

This commit is contained in:
114465 2024-02-02 19:28:23 -05:00
parent 00e91c99f9
commit 88aa4a4168
2 changed files with 57 additions and 0 deletions

3
notes/README.md Normal file
View File

@ -0,0 +1,3 @@
## A basic bash script to organize lists
This script was written to prevent clutter by placing all of my text files in one place out of the way. This script could defiantly be simplified and could also be rewritten to include a different index of notepads per user.
*This script was last updated on Jul 23 2023, a new revision will be made soon.*

54
notes/notes.sh Executable file
View File

@ -0,0 +1,54 @@
#!/bin/bash
#Basic bash script that is just a front end for a cli editor and an exuse to use if statements because I am sick of useing case staments
#set editor of choice
ed=vim
#list options
clear
echo "What would you like to do?"
echo "1: list notepads"
echo "2: make notepad"
echo "3: edit notepad"
echo "4: remove notepad"
read -p "ctrl + c to exit: " sel
#seting options
if [[ $sel = 1 ]];
then
clear
ls .notes_data
read
./notes.sh
elif [[ $sel = 2 ]];
then
clear
ls .notes_data
echo""
echo "What would you like to call it?"
read -p "ctrl + c to exit: " name
touch .notes_data/$name
read -p "Done"
./notes.sh
elif [[ $sel = 3 ]];
then
clear
ls .notes_data
echo "What would you like to edit?"
read -p "ctrl + c to exit: " edit
$ed .notes_data/$edit
./notes.sh
elif [[ $sel = 4 ]];
then
clear
ls .notes_data
echo "What would you like to remove?"
read -p "ctrl + c to exit: " remove
rm .notes_data/$remove
./notes.sh
else
clear
echo "Invalid"
read
./notes.sh
fi