#!/bin/bash SERVER="ws://localhost:8000/" for FILE in "$@"; do JSON=$(printf '{"data_path: "%s"}' "$FILE") echo "$JSON" | websocat "$SERVER" done