I wanted to find all the python scripts on my local machine and put them in a directory eg. (/home/crackpipe/pythons), so I can look through them and learn. I'm attempting to learn Python. I tried this command, but it doesn't work, probably for obvious reasons to someone here:
$ find . -name *.py |cp $1 /home/click/pythons/
cp: missing destination file operand after `/home/crackpipe/pythons'
So it appears "$1" cannot be passed. Not sure what gets passed from "find", if anything. What's a good format to run this? I'm afraid to attempt something like
$ cp -r *.py /home/crackpipe/pythons
in case it attempts to duplicate the entire disk, or most of it, into /home/crackpipe/pythons. I just want the ".py"'s there. Thanks.