From 85bda5968d8fc38533e52885cd74982f97201f77 Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Sun, 30 Nov 2025 06:02:22 -0700 Subject: [PATCH] workan on da changeport --- custom_bin/changeport.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/custom_bin/changeport.sh b/custom_bin/changeport.sh index 0ea21e1..d9ee500 100644 --- a/custom_bin/changeport.sh +++ b/custom_bin/changeport.sh @@ -5,9 +5,9 @@ function subprocess() { COUNTER=0 devarr=() for line in $(dmesg | tail -50 | grep -o -E "tty[A-Z]{3}[0-9]{0,2}" | sort -u); do - echo -e "$COUNTER /dev/$line" - devarr+=("/dev/$line") - COUNTER=$(($COUNTER+1)) + echo -e "$COUNTER /dev/$line" + devarr+=("/dev/$line") + COUNTER=$(($COUNTER+1)) done if [ $COUNTER -gt 0 ]; then @@ -19,14 +19,14 @@ function subprocess() { fi sel=$tty+1 - ret="${devarr[$sel]}" # set dat ret global var here + eval "$1=${devarr[$sel]}" # set dat ret global var here } if [ ! -z "$1" ]; then ret="$1" else ret="" # make this a global so it can be updootewd from inside function - subprocess + subprocess ret fi export ESPPORT="$ret"