No output from `balena device ssh <id> <app>`

#!/bin/bash -ex

for ID in REDACTED; do
	OUTPUT=$(echo "lsusb; exit;" | balena device ssh -t $ID main)
	echo "Response: $OUTPUT"
done

Results in:

+ for ID in REDACTED
++ echo 'lsusb; exit;'
++ balena device ssh -t ID main
+ OUTPUT=
+ echo 'Response: '
Response: 

How do you actually get output to show that the script worked?

OK, this worked better for me:

#!/bin/bash -ex

for ID in REDACTED; do
	echo 'balena-engine exec -t $(balena-engine ps -q -f name=main) /bin/sh -c "lsusb; exit;"; exit;' | balena device ssh $ID || true
done

Not sure why I couldn’t start a session directly with my container.