Commit Diff


commit - f9a0f89ae009a3cd3372def70cdb990b9a74f8d3
commit + d907d2f55bfe8bc9e0b43044eeafd1d39947257f
blob - 02bf9a81625ec14d06b0bb7b7fae3eee771f7cd7
blob + 1c0161acb60b952b78ac929cb1d110df9db65728
--- art/015.cron_tricks.txt
+++ art/015.cron_tricks.txt
@@ -1,7 +1,7 @@
 Title: Cron tricks
 Author: Alexander Arkhipov <aa@manpager.org>
 Created: 2024-06-06
-Modified: 2024-06-06
+Modified: 2024-06-07
 
 cron(8) is one of Unix' most infamous, most helpful, and most annoying
 daemons. There are lots of tricks, which can help make the experience so
@@ -145,7 +145,7 @@ who(1)-filtering bit in a script (e.g. ~/bin/getdisp):
 
 who | awk -v u=${1:-$USER} '
 	$1 == u && $NF ~ /^\(:[0-9]+\)$/ {
-		print substr($NF, 2, length($NF-2)
+		print substr($NF, 2, length($NF)-2)
 		exit
 	}
 '