From owner-freebsd-questions@FreeBSD.ORG Wed May 17 14:29:20 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DDB1216A5EA for ; Wed, 17 May 2006 14:29:20 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail4.sea5.speakeasy.net (mail4.sea5.speakeasy.net [69.17.117.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8DC8543D68 for ; Wed, 17 May 2006 14:29:14 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 21720 invoked from network); 17 May 2006 14:29:14 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail4.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 17 May 2006 14:29:14 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id 83D4F28423; Wed, 17 May 2006 10:29:13 -0400 (EDT) To: References: <000301c67921$941b5a20$01010101@avalon.lan> From: Lowell Gilbert Date: Wed, 17 May 2006 10:29:13 -0400 In-Reply-To: <000301c67921$941b5a20$01010101@avalon.lan> (nospam@mgedv.net's message of "Tue, 16 May 2006 21:47:34 +0200") Message-ID: <44d5ec3eti.fsf@be-well.ilk.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: /bin/sh: wildcard expansion fails X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2006 14:29:27 -0000 "No@SPAM@mgEDV.net" writes: > i know things like "cat *lst|wc", but i don't want to type them. > when i try to use wildcards with "<" or ">" in /bin/sh, it fails: > > my input (only one file with this name exists in the current dir): > wc <*lst Which is equivalent to "wc *lst", so I'm not sure why you'd want to do that... > /bin/sh's output: > cannot open *lst: No such file or directory > > is there a way to configure /bin/sh for "more/better" expansion? No. Incidentally, it is operating as documented (pathname expansion isn't listed as performed on redirection targets), and explicitly allowed by the POSIX standard. > btw, with csh it works fine ;-) And some other shells too, I'm sure. Feel free to fix this yourself; if it still meets the POSIX standards (i.e., still errors out if the expansion returns multiple files), the change would probably be accepted...