From: Carl N Baldwin Date: Thu, 20 Oct 2005 17:45:35 +0000 (-0600) Subject: Found an awk implementation of files-from-date X-Git-Tag: release-0.4~87 X-Git-Url: http://git.pippins.net/embedvideo/static/images/%7Bview%7D?a=commitdiff_plain;h=64041aeff4045970d61980ebe08a06c647dd336c;p=backups%2F.git Found an awk implementation of files-from-date --- diff --git a/scripts/Makefile.am b/scripts/Makefile.am index ae9e2f4..92bd941 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,5 +1,5 @@ bin_SCRIPTS = \ - files-from-date.rb \ + files-from-date.sh \ find-cmd.sh \ list-dates.sh \ other-commands \ diff --git a/scripts/files-from-date.sh b/scripts/files-from-date.sh new file mode 100755 index 0000000..6680e97 --- /dev/null +++ b/scripts/files-from-date.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +[ $# == 1 ] || exit 1 + +awk --posix 'BEGIN { RS="\0" } { d=$7; gsub( /([^ ]*[ ]){7,7}/, "" ); if ( date == d ) printf "%s\0",$0 }' date=$1