FILE=foo.log grep -sn REGEX $FILE | \ awk -F: '{print $1}' | \ xapply -f 'A=$((%1-5)); B=$((%1+5)); echo "-----"; \ sed -ne "${A},${B}p" '$FILE'; \ echo "---"' -
Comments: 0 (view comments) Tags: shell Permalink: /geekery/134 posted at: 14:10