[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ExecResult question
From: |
Tod Oace |
Subject: |
Re: ExecResult question |
Date: |
Mon, 30 Aug 2004 12:40:31 -0700 |
Heh....this is what I ended up doing a while ago:
days = (
01:02:03:04:05:06:07:08:09:10:11:12:13:14:15:16:17:18:19:20:21:22:23:
24:25:26:27:28:29:30:31 )
Yes it's ugly and tedious, but it's more light-weight than forking and
running something else.
-Tod
On Aug 30, 2004, at 11:24, Chip Seraphine wrote:
I'm trying to get a list of days-of-the-month to iterate over (01 thru
31).
I'm doing this:
days= ( ExecResult(/usr/bin/perl -e 'map{printf
"day%02d\n",$_}(1..31)') )
The contents of ExecResult(), when pasted into a shell, work fine
(prints a
newline-delimited list of lines like "day01\nday02\n..."). However,
cfengine
seems to result in $(days) equalling "')" (less the doublequotes).
I've
been futzing about with the quote marks and backslashing various
characters
but haven't gotten anything to work. Any ideas what I am doing wrong?
--
Chip Seraphine
Unix Administrator
TradeLink, LLC
312-264-2048
chip@trdlnk.com
_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine
--
Tod Oace, Intel Corporation <tod@intel.com>