From owner-freebsd-questions@FreeBSD.ORG Thu Jul 17 00:19:29 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D70A1065676 for ; Thu, 17 Jul 2008 00:19:29 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id E15778FC12 for ; Thu, 17 Jul 2008 00:19:28 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl161-31.kln.forthnet.gr [62.1.64.31]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-4) with ESMTP id m6H0JIeF015321 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 17 Jul 2008 03:19:24 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m6H8JsHJ003960; Thu, 17 Jul 2008 11:19:54 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m6H8JoCm003959; Thu, 17 Jul 2008 11:19:50 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: Gary Kline References: <20080714201241.GA22443@thought.org> <20080715073651.P1638@wojtek.tensor.gdynia.pl> <20080715183500.GA76088@thought.org> <20080715190224.GC21840@Grumpy.DynDNS.org> <20080715215024.GA82902@thought.org> Date: Thu, 17 Jul 2008 11:19:49 +0300 In-Reply-To: <20080715215024.GA82902@thought.org> (Gary Kline's message of "Tue, 15 Jul 2008 14:50:24 -0700") Message-ID: <8763r4q5wa.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: m6H0JIeF015321 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.015, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.38, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: Wojciech Puchar , David Kelly , FreeBSD Mailing List Subject: Re: why is this script failing? 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: Thu, 17 Jul 2008 00:19:29 -0000 On Tue, 15 Jul 2008 14:50:24 -0700, Gary Kline wrote: > thanks for this clarification! until yesterday, whe you mmentioned > blanks[whitespace], as id a song title, i hadn't tought about songs > like "Not Ready to Make Nice.ogg" e.g. I am not sure why these > players store the song in wav format without deleting the files, but > when my limited /tmp is full, certain aps fail mysteriously. with a > fwdozen more line of code they could at least fail more gracefully. For those cases, we have find(1) and xargs(1): #!/bin/sh find /var/tmp -name '*.wav' -exec rm '{}' \+ or #!/bin/sh find /var/tmp -name '*.wav' -print0 | xargs -0 rm Whitespace handling _is_ important in shell scripts, but it is also a good idea to entirely avoid having to handle with it when we can :-)