Skip to main content
7 events
when toggle format what by license comment
Feb 26, 2015 at 11:58 vote accept dabadie
Feb 26, 2015 at 11:08 comment added fedorqui @Stéphane Chazelas your edit was almost there: /SWAP/,/^END/ {if ($4>7 && $4!=swap) {swap=$4; print $1, $4}} would work.
Feb 26, 2015 at 11:03 history rollback Stéphane Chazelas
Rollback to Revision 1
Feb 26, 2015 at 11:02 history edited Stéphane Chazelas CC BY-SA 3.0
add SWAP..END requirement.
Feb 26, 2015 at 10:50 comment added fedorqui Probably awk '/SWAP/ {p=1} /^END/ {p=0} (p && $4>7 && $4!=swap) {swap=$4; print $1, $4}' a suffices.
Feb 26, 2015 at 10:47 comment added dabadie Thanks for the response, but how would I get the lines between %SWAP and END? I am assuming that there is more to this file not in the same format as the posted part of the file.
Feb 26, 2015 at 10:35 history answered fedorqui CC BY-SA 3.0