From owner-freebsd-questions@FreeBSD.ORG Fri Dec 22 20:43:05 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 2F2AC16A7C3 for ; Fri, 22 Dec 2006 20:43:05 +0000 (UTC) (envelope-from a@zeos.net) Received: from jan.ukrtel.net (jan.ukrtel.net [195.5.6.41]) by mx1.freebsd.org (Postfix) with ESMTP id DA1CC13C44B for ; Fri, 22 Dec 2006 20:43:04 +0000 (UTC) (envelope-from a@zeos.net) Received: from 91-54-124-91.pool.ukrtel.net ([91.124.54.91] helo=host.my.domain) by jan.ukrtel.net with esmtpa (Exim 4.63) (envelope-from ) id 1Gxp1R-00017u-9R for freebsd-questions@freebsd.org; Fri, 22 Dec 2006 20:22:29 +0200 Received: from host.my.domain (localhost [127.0.0.1]) by host.my.domain (8.13.7/8.13.6) with ESMTP id kBMILOKG000821 for ; Fri, 22 Dec 2006 20:21:24 +0200 (EET) (envelope-from a@zeos.net) Received: (from elisej@localhost) by host.my.domain (8.13.7/8.13.6/Submit) id kBMILOnJ000820 for freebsd-questions@freebsd.org; Fri, 22 Dec 2006 20:21:24 +0200 (EET) (envelope-from a@zeos.net) Date: Fri, 22 Dec 2006 20:21:24 +0200 From: a@zeos.net To: freebsd-questions@freebsd.org Message-ID: <20061222182124.GA603@host.my.domain> Mail-Followup-To: freebsd-questions@freebsd.org References: <20061219195359.GA34750@host.my.domain> <20061221184535.GB40028@dan.emsphone.com> <20061221194409.GA1515@host.my.domain> <20061221204237.GC40028@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20061221204237.GC40028@dan.emsphone.com> User-Agent: mutt-ng/devel-r804 (FreeBSD) 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: Fri, 22 Dec 2006 20:43:05 -0000 On Thu, Dec 21, 2006 at 02:42:37PM -0600, Dan Nelson wrote: > 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 It is interesting idea!