-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtools.sh
More file actions
70 lines (58 loc) · 1.42 KB
/
tools.sh
File metadata and controls
70 lines (58 loc) · 1.42 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
#!/bin/bash
#Menu para levantar ambiente Conda de Python y ejecutar Anaconda3 como editor
# Definiendo Variables
DIR=/home/mduran/Documentos/Develop/Python/anaconda3/bin
#Funcion de Pausa
function pause(){
local message="$@"
[ -z $message ] && message="Presione boton [Enter] para continuar"
read -p "$message" readEnterKey
}
clear
function menu(){
date
echo "---------------------------------"
echo " PROGRAMACION PYTHON - JUPITER "
echo "---------------------------------"
echo "1. Activar ambiente Conda"
echo "2. Desactivar ambiente Conda"
echo "3. Desactivar ambiente Conda"
echo "4. Activar Ambiente Python3"
echo "5. Ejecutar Anaconda 3"
echo "6. Salir"
}
function write_header(){
local h="$@"
echo "---------------------------------------------------------------"
echo " ${h}"
echo "---------------------------------------------------------------"
}
function act_conda(){
write_header " Activando Ambiente Conda para Python "
source /home/mduran/Documentos/Develop/Python/anaconda3/bin/activate
echo Conda Activado
pause
}
function read_input(){
local c
read -p "Seleccion tu opcion [ 1 - 6 ] " c
case $c in
1) act_conda ;;
2) host_info ;;
3) net_info ;;
4) user_info "who" ;;
5) user_info "who" ;;
6) echo "Bye!"; exit 0 ;;
*)
echo "Por Favor selecciona solo de 1 to 6"
pause
esac
}
trap '' SIGINT SIGQUIT SIGTSTP
# main logic
while true
do
clear
menu
read_input
done