We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b053dd commit 664e939Copy full SHA for 664e939
src/numeric-only.sh
@@ -0,0 +1,10 @@
1
+#!/usr/bin/env bash
2
+# Copyright (c) 2018 Joel Wallis Jucá <[email protected]>
3
+# ISC licensed
4
+
5
+# Strips all non-numeric characters from passed arguments
6
+function numeric-only {
7
+ echo -n "$@" \
8
+ | xargs \
9
+ | sed -E "s/[^0-9]+//g"
10
+}
0 commit comments