Project

General

Profile

1
#!/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'
(21-21/46)