File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # Copyright (C) 2025 John Törnblom
3+ #
4+ # This file is free software; you can redistribute it and/or modify it
5+ # under the terms of the GNU General Public License as published by
6+ # the Free Software Foundation; either version 3 of the License, or
7+ # (at your option) any later version.
8+ #
9+ # This program is distributed in the hope that it will be useful, but
10+ # WITHOUT ANY WARRANTY; without even the implied warranty of
11+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+ # General Public License for more details.
13+ #
14+ # You should have received a copy of the GNU General Public License
15+ # along with this program; see the file COPYING. If not see
16+ # <http://www.gnu.org/licenses/>.
17+
18+ SHSRV_PORT=2323
19+
20+ if [ " $# " -lt 1 ]; then
21+ echo " usage: $0 <HOST> [PORT]"
22+ exit 1
23+ fi
24+
25+ SHSRV_HOST=$1
26+
27+ if [ " $# " -gt 1 ]; then
28+ SHSRV_PORT=$2
29+ fi
30+
31+ if [ -x " $( command -v " rlwrap" ) " ]; then
32+ rlwrap telnet $SHSRV_HOST $SHSRV_PORT
33+ else
34+ telnet $SHSRV_HOST $SHSRV_PORT
35+ fi
You can’t perform that action at this time.
0 commit comments