#!/bin/bash CMPDIR=$( fgrep CMPDIR= moshel | cut -d '=' -f 2 ) mkdir -p "$CMPDIR" fgrep CheckFileChanges moshel | \ while read DUMMY CMP FN; do cp -v $FN $CMPDIR/$CMP done