I have a shell script that runs fine from the command line but throws a error when it's run from a cronjob. What could be causing this error?
The following includes the cron, the script, and the error I'm getting in /var/spool/mail.
[jira-svc ~]$ cat jira_trigger_updater.sh#!/usr/bin/shtmp_file=/tmp/merge-issues/$(date --iso-8601=minutes).txtmkdir -p /tmp/merge-issues/usr/bin/curl -s -X GET -H "Content-Type: application/json" "https://my url.com/project-management/rest/api/2/search?jql=filter%3D14219&fields=key,status,fixVersions" -u jira-svc:${UPDATE_TRIGGER_PASSWORD} > ${tmp_file}/usr/bin/jq -r '.issues[] | [.key , .fields.status.name , .fields.fixVersions[].name] | join(",")' ${tmp_file} > /rational/triggers/inputs/jira_merge.csv/usr/bin/chmod 644 /rational/triggers/inputs/jira_merge.csv#rm -rf /tmp/merge-issues[jira-svc ~]$ crontab -l#*/1 * * * * /usr/bin/sh /home/jira-svc/jira_trigger_updater.sh[jira-svc@ ~]$ tail -25 /var/spool/mail/jira-svcFrom jira-svc@cc01.localdomain Tue Feb 8 20:10:02 2022Return-Path: <jira-svc@cc01.localdomain>X-Original-To: jira-svcDelivered-To: jira-svc@cc01.localdomainReceived: by cc01.localdomain (Postfix, from userid 1001) id 9C40168152B5; Tue, 8 Feb 2022 20:10:02 +0000 (UTC)From: "(Cron Daemon)" <jira-svc@cc01.localdomain>To: jira-svc@cc01.localdomainSubject: Cron <jira-svc@cc01> /usr/bin/sh /home/jira-svc/jira_trigger_updater.shContent-Type: text/plain; charset=UTF-8Auto-Submitted: auto-generatedPrecedence: bulkX-Cron-Env: <XDG_SESSION_ID=2172>X-Cron-Env: <XDG_RUNTIME_DIR=/run/user/1001>X-Cron-Env: <LANG=en_US.UTF-8>X-Cron-Env: <SHELL=/bin/sh>X-Cron-Env: <HOME=/home/jira-svc>X-Cron-Env: <PATH=/usr/bin:/bin>X-Cron-Env: <LOGNAME=jira-svc>X-Cron-Env: <USER=jira-svc>Message-Id: <20220208201002.9C40168152B5@cc01.localdomain>Date: Tue, 8 Feb 2022 20:10:02 +0000 (UTC)parse error: Invalid numeric literal at line 13, column 0[jira-svc ~]$