#! /usr/bin/env bash shopt -s nullglob CMD="" for dir in "$@" do if [[ $dir == http\://* || $dir == https\://* || $dir == cdda\://* ]]; then EXP=$dir else EXP=$(realpath -s "`printf '%b' \"$dir\"`") if [[ ! -f $EXP ]]; then EXP=";"$dir fi fi CMD="$CMD""$EXP\n" done MULTIPLEX_CONTROL="\x17" for sock in /tmp/cmv_sock_*; do echo -e "$MULTIPLEX_CONTROL$CMD""X" | socat - UNIX-CONNECT:$sock done for sock in /tmp/camu_control*; do echo -e "$CMD""X" | socat - UNIX-CONNECT:$sock done