*BSD News Article 51137


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.sprintlink.net!news.chattanooga.net!tarush!tom
From: tom@tarush.chattanooga.net (Tom Rush)
Subject: Re: Crontab and the % character
X-Newsreader: TIN [version 1.2 PL2]
Organization: Rush Co.
Message-ID: <DEqoH4.51K@tarush.chattanooga.net>
References: <marcus.225.0201FF80@ccelab.iastate.edu>
Date: Mon, 11 Sep 1995 11:41:27 GMT
Lines: 20

Marcus I. Ryan (marcus@ccelab.iastate.edu) wrote:
: I am running a Cron job using Crontab.  The problem:

: I issue the command - stathtml `date +"%B %b"`
: If I use the %'s by themselves then it interprets them as special control 
: characters, but if I put a \ in front of each, the command is interpreted 
: literally (i.e. "\%B \%b").  Since \ is apparently not working quite right, is 
: there a different character I'm supposed to be using?  I look in man cron and 
: man crontab but neither even mentioned the problem.  

This will work:

stathtml `date +\%'B '\%'b'`

: I would greatly appreciate email responses

(CC'd to questioner)
-- 
Tom Rush
tom@tarush.chattanooga.net