Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • That's really comprehensive, thankyou for taking the time to help me. I modified it based upon your tips, but unfortunately the concatenation still happens on my machine. It think it is probably something obvious that I've missed but I can't see it. I have tried set -x to see if there is a problem but it doesn't really show anything meaningful Commented Sep 8, 2019 at 10:47
  • Also I am keen to take on board your tips about translating functions to standalone scripts if it is possible to still call them in my normal shell via .bash_profile, is there any resource I can consult about doing so? I don't really want to litter my home directory with .sh files or otherwise put my scripts somewhere I'll forget about them Commented Sep 8, 2019 at 10:49
  • 1. from reading the launchctl man page, it looks as if it already searches the appropriate paths. i.e. there's no need to pre-pend a path. try not doing that. 2. see In Bash, when to alias, when to script, and when to write a function? Commented Sep 8, 2019 at 10:54
  • There's also a case of How Can I Expand A Tilde ~ As Part Of A Variable? in filepath="~/Library/Launchagents/$filepath.plist" I think? Commented Sep 8, 2019 at 11:27