From d332a99154945cfebadbf01b56f6033467e1c5ef Mon Sep 17 00:00:00 2001 From: Brian Woods Date: Mon, 6 Feb 2023 19:50:14 -0500 Subject: init push Added: firejail - just scripts for firejail options l2w_snd - piping sound from linux to windows over the network misc_scripts - misc scripts.... proton_sieve - proton sieve file for mainbox sorting sys_ctrl - system control scripts --- sys_ctrl/find_uart | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 sys_ctrl/find_uart (limited to 'sys_ctrl/find_uart') diff --git a/sys_ctrl/find_uart b/sys_ctrl/find_uart new file mode 100755 index 0000000..d7e0f37 --- /dev/null +++ b/sys_ctrl/find_uart @@ -0,0 +1,20 @@ +#!/bin/bash +# SPDX-FileCopyrightText: 2023 Brian Woods +# SPDX-License-Identifier: GPL-2.0-or-later + +if [ "x$1" == "x" ] ; then + echo "please input usb driver to search for" + exit 1 +else + driver=$1 +fi + +for ttyUSB in $( ls /dev/ttyUSB* ) ; do + id=$( udevadm info -q path -n $ttyUSB ) + rv=$( udevadm info -a -p "$id" | grep "$driver" ) + if [ "x$rv" != "x" ] ; then + echo "$ttyUSB" + fi +done + +exit -- cgit v1.2.3