repo: uritools
action: commit
revision: 
path_from: 
revision_from: afedc7a0fb30d6c4e5d01793b2a0d25f6d562666:
path_to: 
revision_to: 
git.thebackupbox.net
uritools
git clone git://git.thebackupbox.net/uritools
commit afedc7a0fb30d6c4e5d01793b2a0d25f6d562666
Author: epoch 
Date:   Fri Aug 19 05:58:46 2022 +0000

    fix a trailing space on dns titles

diff --git a/urititle b/urititle
index f687bd071c45f1fb8d4e448169898d27580e1989..
index ..2a02e0fdfb05f136344e9e7ffdfdc83be5521895 100755
--- a/urititle
+++ b/urititle
@@ -56,7 +56,7 @@ http*)
         printf "title: %s\n" "$title" | html_entities_decode
       fi
     else
-      printf "%s\n" "${a_header}"
+      p rintf "%s\n" "${a_header}"
     fi
   fi
   ;;
@@ -102,8 +102,7 @@ dns)
   else
     server=""
   fi
-  dig $class $type "$path" +short $server | tr '\n' ' '
-  echo # the tr above strips out the trailing \n
+  dig $class $type "$path" +short $server | tr '\n' ' ' | sed 's/ $/\n/'
   ;;
 ftp)
   curl -g "$uri" 2>&1 | tail -n1

-----END OF PAGE-----