Skip to content

Commit 6778e6a

Browse files
committed
add convenient script that connect to shsrv using rlwrap and telnet
1 parent 6bfcb1e commit 6778e6a

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

host_tools/prospero-shell

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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

0 commit comments

Comments
 (0)