다음 쉘 스크립트를 launchd plist로 완전히 구현하여타임스탬프가 포함된 서명StandardErrorPath / StandardErrorPath 파일에 있습니까?
#!/bin/sh
echo "Hi, your FOO.plist was here at $(date)"
이것은 작동하지 않습니다.
…
<key>ProgramArguments</key>
<array>
<string>echo</string>
<string>"Hi, your FOO.plist was here at $(date)"</string>
</array>
…
답변1
launchd는 해석하지 않습니다 $(date)
. 쉘은 다음을 수행합니다.
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
<string>-c</string>
<string>echo Hi, your FOO.plist was here at $(date)</string>
</array>