#!/bin/bash Shared=`shared` for i in $Tmp/arff/*.arff; do echo $i some "$Shared" $i > $Tmp/shared/`basename $i` done