Using PListbuddy

Note that the PListbuddy command and keys have to be in Speech Marks !

#!/bin/bash
#Script to force extensions to be installed into Google Chrome
/usr/libexec/PlistBuddy -c "Delete :ExtensionInstallForcelist array" ~/Library/Preferences/com.google.Chrome.plist
 /usr/libexec/PlistBuddy -c "Add :ExtensionInstallForcelist array" ~/Library/Preferences/com.google.Chrome.plist
 /usr/libexec/PlistBuddy -c "Add :ExtensionInstallForcelist:0 string 'cpngackimfmofbokmjmljamhdncknpmg;https://clients2.google.com/service/update2/crx'" ~/Library/Preferences/com.google.Chrome.plist #
 /usr/libexec/PlistBuddy -c "Add :ExtensionInstallForcelist:0 string 'mihcahmgecmbnbcchbopgniflfhgnkff;https://clients2.google.com/service/update2/crx'" ~/Library/Preferences/com.google.Chrome.plist
 /usr/libexec/PlistBuddy -c "Add :ExtensionInstallForcelist:0 string 'ejidjjhkpiempkbhmpbfngldlkglhimk;https://clients2.google.com/service/update2/crx'" ~/Library/Preferences/com.google.Chrome.plist
 /usr/libexec/PlistBuddy -c "Add :ExtensionInstallForcelist:0 string 'apdfllckaahabafndbhieahigkjlhalf;https://clients2.google.com/service/update2/crx'" ~/Library/Preferences/com.google.Chrome.plist
 /usr/libexec/PlistBuddy -c "Add :ExtensionInstallForcelist:0 string 'ejjicmeblgpmajnghnpcppodonldlgfn;https://clients2.google.com/service/update2/crx'" ~/Library/Preferences/com.google.Chrome.plist
 /usr/libexec/PlistBuddy -c "Add :ExtensionInstallForcelist:0 string 'mgijmajocgfcbeboacabfgobmjgjcoja;https://clients2.google.com/service/update2/crx'" ~/Library/Preferences/com.google.Chrome.plist
 /usr/libexec/PlistBuddy -c "Add :ExtensionInstallForcelist:0 string 'nckgahadagoaajjgafhacjanaoiihapd;https://clients2.google.com/service/update2/crx'" ~/Library/Preferences/com.google.Chrome.plist