"; //print_r($values); //echo ""; ?> ######################################################################################## ######################################################################################## ######################################################################################## ######################################################################################## #!/bin/bash predir="/media/Data" comment_block=1 find lost+found -type f -iname "*.*"| while read FILE do slash=`expr "$FILE" : '.*\([/].*\)'` noslash=${slash:1} fulldir=`cat /media/file_list.txt |grep -F "$noslash"` if [ $comment_block ]; then cat /media/file_list.txt |grep -F "$noslash" | while read PLACE do dir="${PLACE/$noslash/}" echo "$noslash" #echo "$FILE" #echo "$predir$dir" echo "$predir$PLACE" mkdir -p "$predir$dir" cp "$FILE" "$predir$PLACE" done rm -f $FILE fi done