fetch

A MSYS2-compatible sys-info prompt
Log | Files | Refs | README | LICENSE

commit 4b77465a28808e856ffe7913b519d78d095fdf36
parent 4e6dc2a15a640fddc27d0b5d18d8d7a32f6f88b6
Author: Byron Torres <b@torresjrjr>
Date:   Fri, 29 Jan 2021 17:30:59 +0000

Improve _sshd() with single awk process

Diffstat:
Mfetch | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fetch b/fetch @@ -45,7 +45,7 @@ _os() { printf "$1" "$(uname -o)" ;} _kernel() { printf "$1" "$(uname -sr)" ;} _shell() { printf "$1" "${SHELL}" ;} _sshd() { - sshd_pid=$(ps | grep sshd | awk '{print $1}' | paste -s) + sshd_pid=$(ps | awk 'BEGIN{ORS=" "}; /sshd/{print $1}') printf "$1" "${sshd_pid:---}" } _tmux() {