My goal is to run a script in
crontab and save its output (via
echo commands) to a log file. Thus, I am using the following:
$HOME/folder/sh/script.sh 1>$HOME/folder/logs/script.log 2>$HOME/folder/logs/script.err
However, from the command line (not
cron yet), I cannot see the log file at all. The permissions are valid.
If I remove the redirections or keep the redirection to a file in the current directory, I can see the (correct) log contents.
bash script output appear in the log file under a nested folder structure?