Added files to git repo

This commit is contained in:
Jean
2025-07-04 17:23:34 -04:00
parent 28264e542b
commit c531c40418
10 changed files with 1781 additions and 2 deletions

49
list.sh Executable file
View File

@ -0,0 +1,49 @@
#!/bin/bash
set -euo pipefail
BASEDIR="$(dirname "${0}" | sed "s|^\.|${PWD}|")"
DISKS_BY_ID="$(ls -Ago /dev/disk/by-id/ | grep -v 'sr' | grep -v 'dm-' | grep -v 'nvme-eui.' | grep -v '\-part' | grep -v 'wwn-' | grep -v '_[1-9] -> ' | grep -v 'total' | sed -e 's|^.*\:[0-5][0-9] ||g')"
DISKS="$(lsblk -do name | grep -v 'loop' | grep -v 'sr' | grep -v 'zram' | grep -v 'NAME')"
NETWORK_INTERFACES="$(ip -br addr show | sed -e 's| .*$||g' | grep -v '^lo' | grep -v 'tailscale' | grep -v '^wg')"
cat << EOF
#######################################
## ##
## $(cat "${BASEDIR}/title") Script ##
## ##
## Jean <jean@easthighnerd.net> ##
## ##
#######################################
###########################
## ##
## Disks ##
## & ##
## Network Devices ##
## ##
###########################
EOF
cat << EOF
Available disks (/dev/disk/by-id/):
${DISKS_BY_ID}
Available disks (/dev/):
${DISKS}
Available network interfaces:
${NETWORK_INTERFACES}
Press any key to return to the main menu
EOF
read -srn 1