Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

hey thanks | 11 comments | Create New Account
Click here to return to the 'hey thanks' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
hey thanks
Authored by: deef on Oct 16, '06 07:48:33PM

Very cool to see people with much more shell scripting knowledge and experience than me taking this idea & refining it. I've just switched over to the last version above & the speed gains are huge.

One issue came up -- I cut and pasted the script above into Smultron (my editor of choice) & originally got a syntax error in line 40. When I put the two lines beginning with && right at the end onto a single line with the previous one, i.e.

[ $( ls -i "$SEARCHFILE" | sed -E -e 's/ *([0-9]+).*/\1/' ) != $( ls -i "$candidate" | sed -E -e 's/ *([0-9]+).*/\1/' ) ] && cmp -s --bytes 4096 "$SEARCHFILE" "$candidate" && echo "$candidate"

(having also fixed the sed in the way described above) I got it working. Thanks again to Craig, Scott and Marc.

[ Reply to This | # ]