Last active
June 26, 2019 23:11
-
-
Save wnoguchi/f81d0068cdba863f21b94f49ba0560c6 to your computer and use it in GitHub Desktop.
serial console screen wrapper script.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
session_name=$1 | |
case $1 in | |
"SW1") | |
devname=/dev/tty.usbserial-AL00LMJ1 | |
;; | |
"SW2") | |
devname=/dev/tty.usbserial-A504CVAJ | |
;; | |
"SW3") | |
devname=/dev/tty.usbserial-A504APRK | |
;; | |
"SW4") | |
devname=/dev/tty.usbserial-A504CU6I | |
;; | |
"SW5") | |
devname=/dev/tty.usbserial-A504AQ7R | |
;; | |
"SW6") | |
devname=/dev/tty.usbserial-FTGNW2EB | |
;; | |
"SW7") | |
devname=/dev/tty.usbserial-FTZ2DHIG | |
;; | |
"SW8") | |
devname=/dev/tty.usbserial-FTZ2DFBL | |
;; | |
"ASW101") | |
devname=/dev/tty.usbserial-FTK1ROUP | |
;; | |
"ASW1") | |
devname=/dev/tty.usbserial-AI038TTZ | |
;; | |
"ASW2") | |
devname=/dev/tty.usbserial-A504AOKI | |
;; | |
"R1") | |
# R1 | |
devname=/dev/tty.usbserial-AI038TTH | |
;; | |
"R2") | |
# R2 | |
devname=/dev/tty.usbserial-A103NTFZ | |
;; | |
"R3") | |
# R3 | |
devname=/dev/tty.usbserial-AI0388SG | |
;; | |
*) | |
echo "No such device." | |
exit 404 | |
;; | |
esac | |
#screen /dev/${devname} | |
screen -xRS ${session_name} ${devname} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment