#!/bin/sh USER="gueux" HOST="gueux.org" PORT="6600" MUSIC_PATH="/home/music" PRECOMMAND="export PERL5LIB=/home/gueux/lib/perl/lib/perl:/home/gueux/lib/perl/share/perl" FLACINFO="bin/flacinfo" file=$MUSIC_PATH/$(mpc -h "$HOST" -p "$PORT" current -f "%file%") echo "$file" echo "$PRECOMMAND && $FLACINFO \"$file\"" | ssh -T $USER@$HOST