qubes.ConnectTCP 230 B

12345678910
  1. #!/bin/bash
  2. PORT="$1"
  3. [[ -z "$PORT" ]] && { echo "Please provide PORT"; exit 1; };
  4. if [[ "$PORT" -ge 1 ]] && [[ "$PORT" -le 65535 ]]; then
  5. socat STDIO TCP:localhost:"$PORT"
  6. else
  7. echo "Invalid port provided"
  8. exit 1
  9. fi