#!/bin/bash export GARMIN_SAVE_RUNS while read line ; do if [ -z "$GARMIN_SAVE_RUNS" ] ; then GARMIN_SAVE_RUNS=`pwd` fi mkdir -p "$GARMIN_SAVE_RUNS/pending" ln -s "$line" "$GARMIN_SAVE_RUNS/pending/`basename $line`" done < <(garmin_save_runs | grep '^Wrote:' | cut -b7-)