Thursday, January 5, 2012

My Favorite Unix Alias

I use this "z" command every day.  For example, let's say you have a list of files and you want to do something to one of them. 

find . | grep file_im_looking_for   | z

Up pops vim and lets you find the file hilight with the V  command and yank it.  Then you close vim, paste it on the screen and edit your command to do whatever you want.

And here it is, just add to .bash_alias file or .profile:

alias z="tee /tmp/blah; vim /tmp/blah"

No comments: