-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction.sh
More file actions
126 lines (87 loc) · 2.23 KB
/
Copy pathfunction.sh
File metadata and controls
126 lines (87 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# #!/bin/bash
# list_inventory(){
# echo " Welcome to Directory Creator
# -------------------------------
# by Olu Adeyemo"
# read -p "Enter the name of the inventory file: " inventory_name
# echo $inventory_name
# if [[ ! -f $inventory_name ]]
# then
# echo "File does not exist"
# exit 1
# else
# while read -r line
# do
# echo $line
# done < $inventory_name
# fi
# }
# list_inventory
# echo $username
# create_directory(){
# if [[ $# -gt 0 ]]
# then
# if [[ -d $1 ]]
# then
# echo "dir exists already. Moving on .."
# else
# echo "Creating directory $1"
# mkdir $1
# fi
# else
# echo "Enter the right number of arguments"
# fi
# }
#!/bin/bash
# create_note(){
# echo "Creating note ----"
# read -p "Enter note title: " note_title
# read -p "Emter note content: " note_content
# read -p "Save note as .txt: " note_file_name
# if [[ -f $note_file_name ]]
# then
# rm -f $note_file_name
# fi
# touch $note_file_name
# echo $note_title >> $note_file_name
# echo "---------------" >> $note_file_name
# echo $note_content >> $note_file_name
# echo "File saved successfully"
# }
# list_notes(){
# echo "Listing notes"
# }
# welcome_user(){
# echo "------ NOTE TAKING v1.0.0 ----------
# - made with love"
# }
# options_menu(){
# echo "
# 1. -> Create Note
# 2. -> List Notes
# 3. -> Create User
# 4. -> Delete User
# 5. -> Delete Note
# "
# read -p "Choose an option from menu: " option
# case $option in
# 1) echo "create_note" ;;
# 2) echo "list_notes" ;;
# 3) echo "create_user" ;;
# 4) echo "Delete_user" ;;
# 5) echo "Delete_note" ;;
# *) echo "Invalid option"
# esac
# }
# create_note
# list_notes
# welcome_user
# options_menu
# read -p "Enter name: " username
# case $username in
# "james") echo "Welcome $username";;
# "jerry") echo "Welcome $username";;
# "john") echo "Welcome $username";;
# "ay") echo "Welcome $username";;
# *) echo "None matched"
# esac