Tyleo-Dev-ShellScripting-Ol.../SH_PROJECTS/showsystemfilecat.sh

30 lines
694 B
Bash
Raw Normal View History

2024-02-18 21:29:57 +00:00
#!/usr/bin/env bash
# Allow user to show system files with a menu
catfstab="cat /etc/fstab"
cathostname="cat /etc/hostname"
cathosts="cat /etc/hosts"
choice=
printf '
------------------------------------------
SYSTEM CONFIG FILES MENU CHOOSER V1.0b
------------------------------------------
This script will be updated with more features,
for now, you can :
fstab : Show the fstab file
hostname : Show the hostname file
hosts : Show the hosts file
'
echo -n "Make your choice : "
read choice
if [[ $choice = fstab ]]; then
$catfstab
elif [[ $choice = hostname ]]; then
$cathostname
elif [[ $choice = hosts ]]; then
$cathosts
else
echo "Aborting!"
exit
fi