Reduce cat abuse. Thanks pazz0. - annna - Annna the nice friendly bot.
HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
---
DIR commit 9b757c4ea318bf033d595ce77817bcc35e0161e1
DIR parent cb17345a1b7c3cbcc1bed613c888e86d7da1a16a
HTML Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Sun, 3 Sep 2023 21:50:27 +0200
Reduce cat abuse. Thanks pazz0.
Diffstat:
M modules/http-user-agent/add-user-a… | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
DIR diff --git a/modules/http-user-agent/add-user-agent.sh b/modules/http-user-agent/add-user-agent.sh
@@ -15,7 +15,7 @@ isindb="$(grep "${useragent}" "${useragentfile}")"
if [ -z "${isindb}" ];
then
printf "%s\n" "${useragent}" >> "${useragentfile}"
- cat "${useragentfile}" | tail -n 5 > "/tmp/user-agents.tmp"
+ tail -n 5 "${useragentfile}" > "/tmp/user-agents.tmp"
cat "/tmp/user-agents.tmp" > "${useragentfile}"
rm "/tmp/user-agents.tmp"
fi