]> git.nbdom.net Git - nb.git/commitdiff
move cat_stty and echo_stty to ~/nico/bin
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 15 Apr 2024 09:52:52 +0000 (11:52 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 15 Apr 2024 09:52:52 +0000 (11:52 +0200)
etc/profile.d/functions

index b11a5bf806ff3345dde2af5b4d014fdb481897bd..bf3c0e031db0b1c5877e18d1f731cfe12ae69fa9 100755 (executable)
@@ -7,30 +7,6 @@
 
 type -P which > /dev/null || which() { type -P "$1" 2>&1; }
 
-echo_stty() {
-       usage="echo_stty DEVICE [BAUD=9600]"
-       local dev="${1?$usage}"
-       local str="${2?$usage}"
-       local baud="${3:-9600}"
-
-       (cat "$dev" > /dev/null &) >/dev/null 2>&1
-       local pid=$!
-
-       stty "$baud" -F "$dev" raw -echo
-       echo "$str" > "$dev" 
-
-       kill "$pid" >/dev/null 2>&1
-
-       return 0
-}
-
-cat_stty() {
-       usage="cat_stty DEVICE [BAUD=9600]"
-       local dev="${1?$usage}"
-       local baud="${2:-9600}"
-       stty "$baud" -F "$dev" raw -echo && cat "$dev"
-}
-
 which nproc > /dev/null || nproc() {
        case "$OSTYPE" in
                darwin*) sysctl -n hw.ncpu ;;