1

Is it possible to implement the following shell script completely as a launchd plist to generate a signature with timestamp in the StandardErrorPath / StandardErrorPath files?

#!/bin/sh
echo "Hi, your FOO.plist was here at $(date)"

This one doesn't work:

…
<key>ProgramArguments</key>
   <array>
      <string>echo</string>
      <string>"Hi, your FOO.plist was here at $(date)"</string>
   </array>
…
asciiphil
  • 3,036
  • 3
  • 26
  • 52
  • I feared that – but five nervous guys with huge reputation from stackoverflow told me to post it here. I'm sorry for that. Thanks to LCC anyway. – user3077223 Dec 23 '13 at 08:27

1 Answers1

0

launchd does not interpret $(date). A shell does:

<key>ProgramArguments</key>
<array>
    <string>/bin/sh</string>
    <string>-c</string>
    <string>echo Hi, your FOO.plist was here at $(date)</string>
</array>
LCC
  • 181
  • 1
  • 1