Re: bash OK, Cron job not?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Mark Haney wrote:
> John Horne wrote:
>> On Mon, 2007-08-20 at 12:42 -0400, Mark Haney wrote:
>>> I have a strange problem I can't seem to figure out.  Maybe it's the
>>> newbie in me. Below I have the following running in a cron job:
>>>
>>> mail -s "LDM missing files totals: LDM1 `date +%D`" ....
>>>
>>> Now, from bash this works perfectly, I get the date and everything.  But
>>> from cron I get this:
>>>
>>>> /bin/sh: -c: line 0: unexpected EOF while looking for matching ``'
>>>> /bin/sh: -c: line 1: syntax error: unexpected end of file
>>> Can someone explain to me why?
>>>
>> Put a backslash (\) before the percent sign in your cron job. It needs
>> escaping; this has caught me out several times :-)
>>
>> So, try:
>>
>>    mail -s "LDM missing files totals: LDM1 `date +\%D`"
>>
>>
>>
>> John.
>>
>
> I'm an idiot.  I /should/ have seen that a week ago.  Thanks.  Ignore
> the pinhead in the corner.
>
>
The only DUMB question is the one that never gets asked.

Your not DUMB or an IDIOT for asking.

- -James
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iD8DBQFGycmJkNLDmnu1kSkRApojAJ9otS8RdKPBlbhYytNUwj7BqpajJgCdFU2T
O9vCT1CcqOqT4s/JiwIsxvk=
=Yga5
-----END PGP SIGNATURE-----

-- 
Scanned by ClamAV - http://www.clamav.net

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux