From ea49d11668acee629488900abadb4520a5ac8d16 Mon Sep 17 00:00:00 2001 From: Xenhat Hex Date: Wed, 29 Apr 2020 22:27:40 -0400 Subject: [PATCH] scripts: add remove-version-match script by request IDK how to format this for a repository, pls send help. --- remove-version-match.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 remove-version-match.sh diff --git a/remove-version-match.sh b/remove-version-match.sh new file mode 100755 index 0000000..44fcfcf --- /dev/null +++ b/remove-version-match.sh @@ -0,0 +1,6 @@ +#!/bin/sh +if [ -z $1 ]; then + echo "Must specify a file to modify..." + exit 1 +fi +perl -pe 's;^=?(\S+)(?:-[[:digit:]]+\.\S+)(\s)(\S+)$;\1\2\3;' -i "${1}"