Crontab Problem in 4.2 BSD

root rbj at icst-cmr.arpa
Wed Apr 23 08:36:22 AEST 1986


From: yan%siemens.uucp at BRL.ARPA

Crontab problem on 4.2

	I have the following entry in the crontable:

	5 23 * * * /usr/local/bin/dateV '+%m%d' > /usr/adm/yesterday

	"dateV" is the 4.2 "date" command taken from SystemV.
	I expected to see:
		MMDD (where: MM - month, DD - day) 
	in /usr/adm/yesterday, however, I get the following when I "cat"
	/usr/adm/yesterday:
		[ blank line ]
		m
		d

	Why ??
			Thanks in advance.

Unfortunately, you are the victim of a cruel joke. The percent signs
serve as delimiters and mutate into newlines which create input for
the command. Almost no one uses this feature. The effect is as if
you ran the command:

	/usr/local/bin/dateV + << EOF > /usr/adm/yesterday
	m
	d
	EOF

I don't know why the `m' and the `d' were inserted in the output tho.

	(Root Boy) Jim Cottrell		<rbj at cmr>
	"One man gathers what another man spills"



More information about the Comp.unix.wizards mailing list