[nycbug-talk] what are your usefull hacks, the real simple ones

Peter Wright pete at nomadlogic.org
Mon May 8 14:18:21 EDT 2006


> Well I was curious how out of wack my installed ports were, after a
> portsnap update, and came up with this:
>
> pkg_version|awk '{ a[$2]++} END {for (i in a) { print i ,a[i]}}'
>
> to give me a sumery, which got refined into this bash function:
>
> pkg_version () { /usr/sbin/pkg_version $@ |
>      awk '{ a[$2]++; print $0 } END {print ""; for (i in a) { print i
> ,a[i]}}';
> }
>
> which now sits in my .bash_profile/.profile.
>
> any other short and quick hacks out there?
>

ok, this one is dumb - and more of a pet peeve thing.  but i've grown fond
of defining your path's ala:

# from ~/.cshrc
set path = ( ~/bin /bin /sbin\
/usr/{bin,sbin,X11R6/bin,local/bin,local/sbin,games} .)

not sure why, but on most linux type os's i've used they do not seem to
define path's in this way by default...

-pete



-- 
~~oO00Oo~~
Peter Wright
pete at nomadlogic.org
www.nomadlogic.org/~pete
310.869.9459



More information about the talk mailing list