#!/bin/sh arg="$@" # Strip undesired directory component dir=$(dirname "$arg") text="${arg#$dir/}" echo "$text" | festival --tts