Skip to content

Instantly share code, notes, and snippets.

@xmcgyver
xmcgyver / vimp.sh
Created September 1, 2010 09:18
vimp = vi + pimp (allows vi to open a file from a grep search at the specified line number from the search result)
#!/bin/bash
# vimp = vi + pimp (allows vi to open a file from a grep search at the specified line number from the search result)
# (example usage -> prompt$ vimp /etc/hosts:23)
# tested on OS X 10.6 only
x="$1"
y=`basename $1`
# if colon in param
if [[ $y == *:* ]]