aboutsummaryrefslogtreecommitdiff
path: root/bin/urlmt
diff options
context:
space:
mode:
Diffstat (limited to 'bin/urlmt')
-rwxr-xr-xbin/urlmt8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/urlmt b/bin/urlmt
index 465ff588..7332663e 100755
--- a/bin/urlmt
+++ b/bin/urlmt
@@ -1,3 +1,9 @@
#!/bin/sh
# Get the MIME type for a given URL
-urlh "$1" Content-Type | sed 's/; .*//'
+urlh "$1" Content-Type |
+
+# Use last line only, remove any charset suffix
+sed '
+$!d
+s/; .*//
+'