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)
99# Loop through output
1010while IFS= read -r line; do
1111 # Get username
12- USERNAME=$( echo " $line " | awk ' {print $1}' )
12+ USERNAME=$( /usr/bin/ echo " $line " | /usr/bin/ awk ' {print $1}' )
1313 # Get display (everything between () and remove the ())
1414 # 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' )
1616 # Go to next line if display does not start with :
1717 if ! [[ " $DISPLAY " =~ ^: ]]; then
1818 continue
@@ -32,9 +32,9 @@ while IFS= read -r line; do
3232 # Sanitize the timestamp to ensure it's a number
3333 if [[ " $LOCKED_AT_TIMESTAMP " =~ ^[0-9]+$ ]]; then
3434 # 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 ))
3636 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
3838 TIME_SINCE_LOCK=0
3939 fi
4040 fi
You can’t perform that action at this time.
0 commit comments