@ etresoft
I apologise for not being more specific. I hope the details below will clarify the situation a little.
@ twtwtw
Thanks for your details. They have improved my understanding but I have not yet found where my unusual limit is defined. Please see below.
Since your posts I have been playing with the following test plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EnableGlobbing</key>
<true/>
<key>Label</key>
<string>reset-safari</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>-c</string>
<string>echo "
123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 1
56789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123
6789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 1234
789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
89 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456
9 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 1234567
123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678
123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12
" > /Users/neville/Desktop/tmp.txt
</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
I have discovered that with EnableGlobbing set to true the maximum size of the bash script which will work is 1024 bytes. As the size is increased further the name of tmp.txt starts getting truncated and eventually random errors are generated such as - unexpected EOF while looking for matching `"' - I have had errors claiming a missing quote or bracket even when they do not exist in my script.
With EnableGlobbing set to false the maximum size of the bash script which will work is 4096 bytes. As the size is increased further output is totally inhibited without file truncation or any error reports - random or otherwise.
I have noted that any bash comments count towards the above maxima.
I would be grateful if anybody can shed further light on this.
I will investigate alternatives to EnableGlobbing - I have not used it before and only need it this time to expand '~' in one location.