All pastes #981660 Raw Edit

Stuff

public shellscript v1 · immutable
·published 2008-04-11 23:16 UTC
rendered paste body
#!/bin/bashpredir="/media/Data"comment_block=1find lost+found -type f -iname "*.*"| while read FILEdo        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 PATH	do			dir="${PATH/$noslash/}"			echo "$noslash"			#echo "$predir$dir"			echo "$predir$PATH"			mkdir -p "$predir$dir"			cp "$noslash" "$predir$PATH"	done	#rm -f $FILE	fidone