Skip to main content
Question

Bash Script

  • May 9, 2022
  • 1 reply
  • 0 views

rajrajan
Forum|alt.badge.img+6

How do I bash script this one for macOS Monterey?

defaults write com.apple.dock persistent-apps -array

 

Please advise

 

Thanks!

Raj.

1 reply

rajrajan
Forum|alt.badge.img+6
  • Author
  • Contributor
  • 14 replies
  • May 9, 2022

Dear All,

 

Sorted, thanks!

 

#!/bin/sh

user=`ls -la /dev/console | cut -d " " -f 4`

 

sudo -u $user defaults write com.apple.dock persistent-apps -array

 

sudo -u $user killall Dock

 

exit 0

 

 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings