Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Script help...

Received: by 10.68.241.37 with SMTP id wf5mr3002036pbc.4.1329378361588;
        Wed, 15 Feb 2012 23:46:01 -0800 (PST)
Path: wr5ni31009pbc.0!nntp.google.com!news2.google.com!goblin1!goblin.stu.neva.ru!news.osn.de!diablo2.news.osn.de!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail
From: Ralf Goertz <r_goe...@usenet.arcornews.de>
Date: Thu, 16 Feb 2012 08:37:12 +0100
User-Agent: KNode/4.7.2
Subject: Re: Script help...
Newsgroups: gnu.bash
References: <c5184d4a-686f-4ee8-9128-33c18556d388@f30g2000yqh.googlegroups.com> <2ce21a67-ac91-47f9-97ce-176aa96f0075@m24g2000yqb.googlegroups.com> <gcpq09-nlu.ln1@cjlocal.com>
MIME-Version: 1.0
Lines: 13
Message-ID: <4f3cb233$0$6578$9b4e6d93@newsspool3.arcor-online.net>
Organization: Arcor
NNTP-Posting-Date: 16 Feb 2012 08:37:24 CET
NNTP-Posting-Host: da1955cc.newsspool3.arcor-online.net
X-Trace: DXC=KnGYkgT2?@;=FQB?mjjV50McF=Q^Z^V384Fo<]lROoR18kF<OcfhCO;m`eK4<g2^o=VkQMJaF9@m;cVTRQBBmCS6XgQ@ge<5Go8
X-Complaints-To: usenet-abuse@arcor.de
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7Bit

Chris F.A. Johnson wrote:

> For those not using bash (and even those who are):
> 
> eval "date '+dow=%w dom=%e'"
> if [ "$dow" -eq 2 ] && [ "$dom" -ge 8 ] && [ "$dom" -le 14 ]
> then
> : whatever
> done

Hm, apart from the obvious "done" "fi" mixup this doesn't work for me as
the eval line doesn't seem to get evaluated, it only gets printed. $dow
and $dom are empty in line 2.