From owner-freebsd-questions@FreeBSD.ORG Thu Dec 21 20:42:38 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A74216A417 for ; Thu, 21 Dec 2006 20:42:38 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 1C1CB13C463 for ; Thu, 21 Dec 2006 20:42:37 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.6/8.13.8) id kBLKgbcE024638 for freebsd-questions@freebsd.org; Thu, 21 Dec 2006 14:42:37 -0600 (CST) (envelope-from dan) Date: Thu, 21 Dec 2006 14:42:37 -0600 From: Dan Nelson To: freebsd-questions@freebsd.org Message-ID: <20061221204237.GC40028@dan.emsphone.com> References: <20061219195359.GA34750@host.my.domain> <20061221184535.GB40028@dan.emsphone.com> <20061221194409.GA1515@host.my.domain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061221194409.GA1515@host.my.domain> X-OS: FreeBSD 6.2-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.13 (2006-08-11) Subject: Re: Is there UNIX analog of ftp command pls? 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, 21 Dec 2006 20:42:38 -0000 In the last episode (Dec 21), a@zeos.net said: > On Thu, Dec 21, 2006 at 12:45:35PM -0600, Dan Nelson wrote: > > In the last episode (Dec 19), a@zeos.net said: > > > Is there UNIX analog of ftp command pls, i. e. ls | less ? > > Thank you for response, but I know how to write aliases and bash > scripts. I just thought, I don't know the standard way. > > Apropos, > alias pls="ls -l | less" > is not a proper way, because of the command > > pls directory > > will give > > ls -l | less directory > > which is not what one want. Yes, that is a limitation of aliases. Luckily, shell functions can do what you want: pls() { ls -l "$@" | less } -- Dan Nelson dnelson@allantgroup.com