da heckyan workans

This commit is contained in:
2024-10-29 07:13:30 -06:00
parent 2c779ed536
commit ee40b8e6de
5 changed files with 6 additions and 3 deletions
+27
View File
@@ -0,0 +1,27 @@
subprocess() {
echo "\nChanging ESPPORT\n"
echo "TTY devices found in dmesg:"
COUNTER=0
devarr=()
for line in $(dmesg | tail -50 | grep -o -E "tty[A-Z]{3}[0-9]{0,2}" | sort -u); do
echo "$COUNTER /dev/$line"
devarr+=("/dev/$line")
COUNTER=$((COUNTER+1))
done
echo "\nEnter TTY Number You'd Like:"
read tty
sel=$tty+1
eval "$1=$devarr[$sel]"
return 0
}
ret=''
subprocess ret
export ESPPORT=$ret
echo "\nESPPORT set to ${ESPPORT}\n"
echo "\nall done :3\n"