commit d62e836f685a1d6e65b6c9e2d633a955e397d05e parent f6128ce3a20b026c20394751087f6ab4b7bee725 Author: phoebos <ben@bvnf.space> Date: Wed, 11 May 2022 01:52:30 +0100 finger: fix if no user Diffstat:
M | finger | | | 5 | ++++- |
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/finger b/finger @@ -6,7 +6,10 @@ } for u; do - user="${u%%@*}" + case "$u" in + *@*) user="${u%%@*}" ;; + *) user="" ;; + esac host="${u##*@}" printf "[%s@%s]\n" "$user" "$host" printf "%s\r\n" "$user" | ./nc "$host" 79