aboutsummaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorJohn Ankarstr\xf6m <john@ankarstrom.se>2021-05-31 19:39:42 +0200
committerJohn Ankarstr\xf6m <john@ankarstrom.se>2021-05-31 19:39:42 +0200
commita8c2415961ae8b952a4fc57f19435c1d5ef883dd (patch)
tree8a8e64cc225dde621be231c4c58b79c8cc3432eb /inc
parent483a7f3168793fc8980727f417b1e8087eed4fa3 (diff)
downloadxutil-a8c2415961ae8b952a4fc57f19435c1d5ef883dd.tar.gz
Add 'inc' utility
Diffstat (limited to 'inc')
-rwxr-xr-xinc3
1 files changed, 3 insertions, 0 deletions
diff --git a/inc b/inc
new file mode 100755
index 0000000..51345a5
--- /dev/null
+++ b/inc
@@ -0,0 +1,3 @@
+#!/usr/bin/perl -p
+# inc -- increment numbers in lines
+s/\d+/$n=$& if!$n;$n+$i++/e