2
當在shell上手動運行它時工作得很好,但是當我設置一個cronjob在重新啓動時運行它時,我得到「bad variable name」。由cron啓動的bash腳本中的「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
'#!/bin/sh'有錯誤的空間。它應該是'#!/ bin/sh'。 – fedorqui 2014-10-08 09:37:49
@fedorqui我認爲這個空間太錯了,但顯然它是可以接受的... http://stackoverflow.com/questions/10197690/perl-shebang-space – 2014-10-08 11:00:09
@MarkSetchell有趣!我每天都在這個網站學習東西。非常好知道。 – fedorqui 2014-10-08 11:39:07