Makes Meidum.com url shorter
This commit is contained in:
12
bin/medium-short
Executable file
12
bin/medium-short
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function short() {
|
||||||
|
sed -r 's|/[^/]+-(.*)$|/\1|'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if [[ $# -eq 0 ]]; then
|
||||||
|
short
|
||||||
|
else
|
||||||
|
echo "$1" | short
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user