File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ WHO_OUTPUT=$(/usr/bin/who)
9
9
# Loop through output
10
10
while IFS= read -r line; do
11
11
# Get username
12
- USERNAME=$( echo " $line " | awk ' {print $1}' )
12
+ USERNAME=$( /usr/bin/ echo " $line " | /usr/bin/ awk ' {print $1}' )
13
13
# Get display (everything between () and remove the ())
14
14
# Cannot use awk here to print a specific column because columns might contain spaces...
15
- DISPLAY=$( echo " $line " | sed -n ' s/.*(\(.*\))/\1/p' )
15
+ DISPLAY=$( /usr/bin/ echo " $line " | /usr/bin/ sed -n ' s/.*(\(.*\))/\1/p' )
16
16
# Go to next line if display does not start with :
17
17
if ! [[ " $DISPLAY " =~ ^: ]]; then
18
18
continue
@@ -32,9 +32,9 @@ while IFS= read -r line; do
32
32
# Sanitize the timestamp to ensure it's a number
33
33
if [[ " $LOCKED_AT_TIMESTAMP " =~ ^[0-9]+$ ]]; then
34
34
# Calculate the time since the session was locked
35
- TIME_SINCE_LOCK=$(( ($(date +% s) - LOCKED_AT_TIMESTAMP) * 1000 ))
35
+ TIME_SINCE_LOCK=$(( ($(/ usr / bin / date +% s) - LOCKED_AT_TIMESTAMP) * 1000 ))
36
36
else
37
- echo " Warning: Invalid timestamp in /tmp/codam_web_greeter_lock_timestamp_$USERNAME : $LOCKED_AT_TIMESTAMP " >&2
37
+ /usr/bin/ echo " Warning: Invalid timestamp in /tmp/codam_web_greeter_lock_timestamp_$USERNAME : $LOCKED_AT_TIMESTAMP " >&2
38
38
TIME_SINCE_LOCK=0
39
39
fi
40
40
fi
You can’t perform that action at this time.
0 commit comments