0

I am writing some scripts that uses ${USER} to point to subsequent scripts. But when I run it from crontab, it errors out and the files are not found. I understand why.

I intend to share this with my colleagues and each time the colleague has to manually change the first line to his own username. How can I minimize this issue (not have a manual way to change that one line)?

2

1 Answer 1

2

It's a typo. You should use $USER, not ${USER}.

Cron parses these lines itself and does only simple variable substitution; it is not a shell.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.