[nycbug-talk] pkg_info

jc jesse
Mon Feb 23 16:50:07 EST 2004


I'm not in love with myself or anything, but I like to check my packages
every once in a while. I was doing some stuff [which I'd probably have never
ventured to do w/o the help of freebsddiary.org] and needed to get the
installed packages without the descriptions. I made a perl script which
would s/^ +$//. It was a little more than a one-liner, but I had to... let
me be explicit:


open PKG, "pkg_info |";
while (<PKG>) {
    s/^ +$//;   # theres a space between ^ +
    print;
}

How else can I do this? Whats the regex to use in sed? I know it's boring,
but I'm bored.






More information about the talk mailing list