Skip to content

Commit 77ccf3b

Browse files
committed
Update for Mojave
Updated line 158 for Mojave compatibility.
1 parent 1f7132f commit 77ccf3b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Computer Information.bash

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
https://github.com/talkingmoose/Jamf-Scripts
1111
1212
Originally posted: August 13, 2018
13+
Updated: April 7, 2019
1314
1415
Purpose: Display a dialog to end users with computer information when
1516
run from within Jamf Pro Self Service. Useful for Help Desks to
@@ -154,7 +155,7 @@ operatingSystem="Operating System: $runCommand"
154155

155156

156157
# Display battery cycle count
157-
runCommand=$( /usr/sbin/ioreg -r -c "AppleSmartBattery" | /usr/bin/grep -w "CycleCount" | /usr/bin/awk '{print $3}' | /usr/bin/sed s/\"//g )
158+
runCommand=$( /usr/sbin/ioreg -r -c "AppleSmartBattery" | /usr/bin/grep '"CycleCount" = ' | /usr/bin/awk '{ print $3 }' | /usr/bin/sed s/\"//g )
158159
batteryCycleCount="Battery Cycle Count: $runCommand"
159160

160161

0 commit comments

Comments
 (0)