#!/bin/bash function s { ssh root@jg928a "$(printf '%q ' "$@")" } echo before: | tr '\n' '\t' s ubus call poe info s ubus call poe manage '{"port": "'$1'", "enable": false}' sleep 2; echo after shutoff: | tr '\n' '\t'; s ubus call poe info; s ubus call poe manage '{"port": "'$1'", "enable": true}' sleep 2;