-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdate_time.sh
More file actions
15 lines (10 loc) · 730 Bytes
/
date_time.sh
File metadata and controls
15 lines (10 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
# the above line specifies which bash interpreter and path should be used - used to execute the script
# Define a new function that can be called from the main menu for date/time:
get_date_time() {
DATE=`date` # use the date of the operating system/local machine via a new variable called DATE
dialog --backtitle "Current date and time" --title "Date:Time" --msgbox "$DATE" 0 0
source menu.sh # gets source file contents from menu.sh file - main menu
local dialog_status=0 # define a new local variable with the value of 0 for the dialog status
run_bash_menu 0 # returns user to main menu by calling this function with a default dialog status value state of 0
} # end of function