dancrew32 / pickdrop

A unix shell script which allows you to "pick" files one at a time and then drop them in one place

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hi, I made this shell script so that I could
pick up files as I wander about on the command
line and then drop them in the same location.

I thought you might like it, too. In order to
install and use:

chmod 755 pick && sudo cp pick /usr/bin/
chmod 755 drop && sudo cp drop /usr/bin/

then you can cruise around and do:

pick filename1 filename2
cd otherdir
pick otherfile
... etc ...

cd /home
mkdir central && cd central
drop

It's not robust at all - it stores your picks
in ~/.pick until you call drop at which time it
uses the file paths in ~/.pick to create a new
executable ~/.drop file to copy each of the
files you picked to the current working
directory.

Thanks to André Paramés Pereira for the patch
to run multiple files at once.

git user erickworking added this gist:

https://gist.github.com/833140

"It allows multiple file selection and running
arbitrary commands. The string {} is replaced
by the file name in run (e.g. "run cp -v {} ."
copies all the files to the current directory)."

Thanks to andresp on reddit for strengthening
the script so it won't break with special chars
or spaces, and also making it more efficient!

About

A unix shell script which allows you to "pick" files one at a time and then drop them in one place


Languages

Language:Shell 100.0%