"bad variable name" in bash script started by cron -



"bad variable name" in bash script started by cron -

works fine when running manually on shell when setup cronjob run on reboot "bad variable name".

#! /bin/sh # /etc/init.d/duplicitycleanup export passphrase=foo duplicity remove-older-than 30d --force --gio smb://remote/archiv/ duplicity remove-all-but-n-full 1 --force --gio smb://remote/archiv/ unset passphrase

there space between #! , /bin/sh. don't think reported problem needs fixing

i guess using version of unix or linux /bin/sh not bash export syntax wrong.

alter script say

passphrase=foo export passphrase

see reply unix export command

bash cron

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -