I'm having trouble with {7,7} in gawk on ubuntu. So, I am using the more verbose...
[backups/.git] / scripts / files-from-date.sh
index 2db6fc228c378165e316fb3a00236dbd464360b7..de98d4366d46250cce9eec3d93f7b7b83f5269fb 100755 (executable)
@@ -2,4 +2,4 @@
 
 [ $# == 1 ] || exit 1
 
-gawk --posix 'BEGIN { RS="\0" } { d=$7; gsub( /^([^ ]*[ ]){7,7}/, "" ); if ( date == d ) printf "%s\0",$0 }' date=$1
+awk 'BEGIN { RS="\0" } { d=$7; sub( /^([^ ]*[ ])([^ ]*[ ])([^ ]*[ ])([^ ]*[ ])([^ ]*[ ])([^ ]*[ ])([^ ]*[ ])/, "" ); if ( date == d ) printf "%s\0",$0 }' date=$1