Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Usually, you can replace any grep | awk with just awk. In the instance above, you could say awk '/^C/{print $2}'.
    • by Ovid (2709) on 2008.04.28 4:32 (#62431) Homepage Journal

      Thanks. Works like a charm. I now have the following:

      alias edit_conflicts="${EDITOR:-vim} \$(svn status|awk '/^C/{print \$2}')"
      alias edit_code="${EDITOR:-vim} \$(svn st | awk '/^[AM].*p[ml]/{print \$2}')"
      alias edit_tests="${EDITOR:-vim} \$(svn st | awk '/^[AM].*\.t$/{print \$2}')"