scripts: add remove-version-match script by request

IDK how to format this for a repository, pls send help.
This commit is contained in:
Xenhat Hex 2020-04-29 22:27:40 -04:00
parent c9a1bc2f79
commit ea49d11668
No known key found for this signature in database
GPG Key ID: 03FE57ED1424AB4D

6
remove-version-match.sh Executable file
View File

@ -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}"