Project

General

Profile

1 1545 aaronmk
#!/bin/sh
2
# Extracts jobspecs (%#) from (possibly filtered) `jobs` output
3
# Usage: self
4
5
sedEreFlag="$(test "$(uname)" = Darwin && echo E || echo r)"
6
7
sed () { "$(which sed)" -"$sedEreFlag" "$@";}
8
9
sed -n 's/^\[([0-9]+)\].*$/%\1/p'