Updated variable names and casing

This commit is contained in:
2025-12-24 18:55:43 -05:00
parent 07caef3f2c
commit 13f87e00dd
4 changed files with 33 additions and 33 deletions

16
list.sh
View File

@@ -2,18 +2,18 @@
set -euo pipefail
BASEDIR="$(dirname "${0}" | sed "s|^\.|${PWD}|")"
baseDir="$(realpath "$(dirname "${0}")")"
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')"
disksById="$(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')"
networkInterfaces="$(ip -br addr show | sed -e 's| .*$||g' | grep -v '^lo' | grep -v 'tailscale' | grep -v '^wg')"
cat << EOF
#######################################
## ##
## $(cat "${BASEDIR}/title") Script ##
## $(cat "${baseDir}/title") Script ##
## ##
## Jean <jean@easthighnerd.net> ##
## ##
@@ -34,13 +34,13 @@ EOF
cat << EOF
Available disks (/dev/disk/by-id/):
${DISKS_BY_ID}
${disksById}
Available disks (/dev/):
${DISKS}
${disks}
Available network interfaces:
${NETWORK_INTERFACES}
${networkInterfaces}
Press any key to return to the main menu