LMSouq
php-dev Open

/bin/sh: Syntax error: Unterminated quoted string

OO
oompahloompah
1 month ago
4 views
Problem Description
I am trying to get a cronjob to pipe output into a dated file in a specified (folder) location. My crontab entry looks something like this: * * * * * /some/path/test.sh >> $(date "+/home/oompah/logs/%Y%m%d.test.log") What I don't understand is that when I type this command at the console, I get the correct string: echo $(date "+/home/oompah/logs/%Y%m%d.test.log") /home/oompah/logs/20110329.test.log What's causing this error and how may I fix it? bash version info is: GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base