Added notes.sh
This commit is contained in:
parent
00e91c99f9
commit
88aa4a4168
|
@ -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.*
|
|
@ -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
|
Loading…
Reference in New Issue