From owner-freebsd-questions@FreeBSD.ORG Mon Jun 13 23:48:35 2011 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9CF0106566C for ; Mon, 13 Jun 2011 23:48:35 +0000 (UTC) (envelope-from kurt.buff@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 3B8CF8FC08 for ; Mon, 13 Jun 2011 23:48:34 +0000 (UTC) Received: by wwc33 with SMTP id 33so5244860wwc.31 for ; Mon, 13 Jun 2011 16:48:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=4bIFiBpKHE8MTQ+2Tk1ceJU7q8ktAjrvXDa8uRPbZoo=; b=dlxwl8h8FOGuZxjZ47LcbTbl7v5BHmnhAJpIBmmcq7CbWSzbbQtlkevnnM2jro8BCz Np7xdy7wvh3sC5LiFDVFncp6ZZ1wzTFxQK8EvLYH/rtmqeLu0AB3qbwFE8Z5IquGLmmG g59HZCnLicLo3CkR9pjkN7JpVoVUyVl7bl+Mw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=toR9VQx0D7nr25ELrUIYIfhmCXF9rLmKdCvnEnhp8hcHRC9APrw1SWcVcanKavzDtH XPw4Af46f/6DGw9/ntr+w4H4eDv9avSYZzKk+InvMfe1CQMFyNwraC3jbCmbWg24zvOC YmH5LqKLhMnP/1iNKOPJ8ZAAI3HqNZSWwy5Zo= MIME-Version: 1.0 Received: by 10.217.7.3 with SMTP id z3mr5414805wes.68.1308008914273; Mon, 13 Jun 2011 16:48:34 -0700 (PDT) Received: by 10.216.46.7 with HTTP; Mon, 13 Jun 2011 16:48:34 -0700 (PDT) In-Reply-To: <20110614000258.c5cb84f3.freebsd@edvax.de> References: <20110614000258.c5cb84f3.freebsd@edvax.de> Date: Mon, 13 Jun 2011 16:48:34 -0700 Message-ID: From: Kurt Buff To: Polytropon Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Questions Subject: Re: Probably working too hard for this cron question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2011 23:48:35 -0000 On Mon, Jun 13, 2011 at 15:02, Polytropon wrote: > On Mon, 13 Jun 2011 14:44:29 -0700, Kurt Buff wrote= : >> Per the handbook, I added >> >> =C2=A0 =C2=A0 =C2=A0SHELL=3D/bin/sh >> >> to crontab, and I also added >> >> =C2=A0 =C2=A0 =C2=A0#!/bin/sh >> >> as the first line in the script >> >> But, while a file is being created, it's just >> >> =C2=A0 =C2=A0 =C2=A0/root/-external1.txt >> >> not >> >> =C2=A0 =C2=A0 =C2=A0/root/2011-06-13-external1.txt > > Just a wild guess: How about adding {} to the variable > identifiers? There are some restrictions in how far a > character following the variable name will be treated > as a "stop sign", e. g. variable x, literal y, and you > have $xy which won't work, but $x_y may work, so you > use ${x}y to make sure the name is properly scoped. > > Refering to your original script: > > #!/bin/sh > dt=3D`/bin/date "+%Y-%m-%d"` > /bin/date > /root/${dt}-external1.txt > /usr/local/bin/curl -K /root/urls.txt >> /root/${dt}-external1.txt > /bin/date >> /root/${dt}-external1.txt > > Could you try that? Can, and did, and it works like a champ. That solves the last issue. My thank to you Polytropon, and to those who replied privately. Now all I have to do is pin down whether the name resolution slowness is in our firewall, or web filter, or external router, or perhaps something at the ISP. Kurt