diff options
author | John Ankarstr\xf6m <john@ankarstrom.se> | 2021-05-31 19:39:42 +0200 |
---|---|---|
committer | John Ankarstr\xf6m <john@ankarstrom.se> | 2021-05-31 19:39:42 +0200 |
commit | a8c2415961ae8b952a4fc57f19435c1d5ef883dd (patch) | |
tree | 8a8e64cc225dde621be231c4c58b79c8cc3432eb | |
parent | 483a7f3168793fc8980727f417b1e8087eed4fa3 (diff) | |
download | xutil-a8c2415961ae8b952a4fc57f19435c1d5ef883dd.tar.gz |
Add 'inc' utility
-rw-r--r-- | Makefile | 7 | ||||
-rwxr-xr-x | inc | 3 |
2 files changed, 5 insertions, 5 deletions
@@ -1,6 +1,3 @@ -install: bin man - -man: +install: install -m 644 *.1 /usr/local/man/man1/ -bin: - ls * | grep -v '\.1$$' | xargs -I{} install {} /usr/local/bin/ + install `ls -l | awk '$$1 ~ /x$$/ {print $$NF}'` /usr/local/bin @@ -0,0 +1,3 @@ +#!/usr/bin/perl -p +# inc -- increment numbers in lines +s/\d+/$n=$& if!$n;$n+$i++/e |