You could reduce the O of that second command by replacing md5sum * grep $i with echo $i, so it would be:
for i in `md5sum * | cut -d\ -f1 | sort | uniq -d`; do echo $i; done
Quote from: Camel on February 01, 2008, 11:06:23 AM
You could reduce the O of that second command by replacing md5sum * grep $i with echo $i, so it would be:
for i in `md5sum * | cut -d\ -f1 | sort | uniq -d`; do echo $i; done
That's how I originally did it, but then you don't know which files matched. This way, you can see which files have the same md5, and the common ones are beside each other because of the sort.
Quote
andrew@roflbirds:~$ perl -pi -e 'tr/a-mn-zA-MN-Z/n-za-mN-ZA-M/;'
newbys mom
arjolf zbz
has got it goin on
unf tbg vg tbva ba
hm, quote > code ^^
I'll post the one for converting an album from .flac to .mp3 if I get some time. It was super handy. :)
Quote from: Ender on February 02, 2008, 04:01:04 AM
Quote
andrew@roflbirds:~$ perl -pi -e 'tr/a-mn-zA-MN-Z/n-za-mN-ZA-M/;'
newbys mom
arjolf zbz
has got it goin on
unf tbg vg tbva ba
hm, quote > code ^^
You can drop the
-i flag because you're not editing a file in place.
It occurs to me that I mean "shellscript" and not "shellcode".. haha
Quote from: mynameistmp on February 02, 2008, 12:00:47 PM
Quote from: Ender on February 02, 2008, 04:01:04 AM
Quote
andrew@roflbirds:~$ perl -pi -e 'tr/a-mn-zA-MN-Z/n-za-mN-ZA-M/;'
newbys mom
arjolf zbz
has got it goin on
unf tbg vg tbva ba
hm, quote > code ^^
You can drop the -i flag because you're not editing a file in place.
I know, but I prefer to use a standard command if I can; that way I remember it better.