Bash Script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 05-09-2022 12:31 AM
How do I bash script this one for macOS Monterey?
defaults write com.apple.dock persistent-apps -array
Please advise
Thanks!
Raj.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 05-09-2022 12:52 AM
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
