Tuesday, March 30, 2010

reimplement which in bash

# function w { ( IFS=:; for i in $PATH; do [[ -f $i/$1 ]] && echo $i/$1 && break; done ) }; w sed

No comments: