aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-15 23:47:14 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-15 23:47:14 +1200
commitf4b94bf643d50d9aecb0de4dbf728f34cb693e09 (patch)
tree7b1db83bc47b144d8b700e3e3a0014f300fdac56 /bin
parentKeep ls(1) option metadata in cache (diff)
downloaddotfiles-f4b94bf643d50d9aecb0de4dbf728f34cb693e09.tar.gz
dotfiles-f4b94bf643d50d9aecb0de4dbf728f34cb693e09.zip
Extend and comment sed(1) in urlmt(1)
Diffstat (limited to 'bin')
-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/; .*//
+'