Better message if parameter is missing

This commit is contained in:
Martin Berghaus
2025-03-26 01:19:38 +01:00
parent 59e7f9abdd
commit ae6093a3cc
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash
_REMOTE_HOST="${1:?"FQDN of server missing"}"
_REMOTE_HOST="${1:?"FQDN of server missing: e.g. host.example.net[:port]"}"
_REMOTE_PORT="${_REMOTE_HOST}:"
_REMOTE_PORT="${_REMOTE_PORT#*:}"
_REMOTE_PORT="${_REMOTE_PORT%%:*}"

View File

@@ -1,6 +1,6 @@
#!/bin/bash
_REMOTE_HOST="${1:?"FQDN of server missing"}"
_REMOTE_HOST="${1:?"FQDN of server missing: e.g. host.example.net[:port]"}"
_REMOTE_PORT="${_REMOTE_HOST}:"
_REMOTE_PORT="${_REMOTE_PORT#*:}"
_REMOTE_PORT="${_REMOTE_PORT%%:*}"