summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-07-22 17:46:43 -0400
committerJesse Luehrs <doy@tozt.net>2021-07-22 17:46:43 -0400
commit09d92a50656a0059a2159bde1d7785a49424af03 (patch)
treec142b50c891ac6c0f735ae69737c1b75a42c7c1d
parent24a114a840ca9dbfc0f963b516441e920acaf4dc (diff)
downloadconf-09d92a50656a0059a2159bde1d7785a49424af03.tar.gz
conf-09d92a50656a0059a2159bde1d7785a49424af03.zip
add script
-rwxr-xr-xbin/files-between14
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/files-between b/bin/files-between
new file mode 100755
index 0000000..634b61c
--- /dev/null
+++ b/bin/files-between
@@ -0,0 +1,14 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use 5.014;
+
+use File::Basename;
+
+my $first = $ARGV[0];
+my $second = $ARGV[1];
+
+my $dirname = dirname($first);
+die unless $dirname eq dirname($second);
+
+say for grep { /^\Q$first\E$/../^\Q$second\E$/ } sort <$dirname/*>;