home
/
code
/
khome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a52188
)
Removing possible trailing colon
author
Siraaj Khandkar
<siraaj@khandkar.net>
Sun, 1 Nov 2020 21:29:55 +0000
(16:29 -0500)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Sun, 1 Nov 2020 21:29:55 +0000
(16:29 -0500)
home/lib/login_functions.sh
patch
|
blob
|
blame
|
history
diff --git
a/home/lib/login_functions.sh
b/home/lib/login_functions.sh
index
01ada21
..
9f06a6b
100644
(file)
--- a/
home/lib/login_functions.sh
+++ b/
home/lib/login_functions.sh
@@
-542,7
+542,12
@@
motd() {
echo
echo 'Loggers'
- awk '{split($5, prog, "["); print prog[1]}' /var/log/syslog \
+ awk '
+ {
+ split($5, prog, "[")
+ sub(":$", "", prog[1]) # if there were no [], than : will is left behind
+ print prog[1]
+ }' /var/log/syslog \
| awk '
{
n = split($1, path, "/") # prog may be in path form
This page took
0.022587 seconds
and
4
git commands to generate.