From owner-freebsd-questions@FreeBSD.ORG Fri Dec 22 22:18:42 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 968A116A407 for ; Fri, 22 Dec 2006 22:18:42 +0000 (UTC) (envelope-from a@zeos.net) Received: from mail5.ukrtel.net (mail5.ukrtel.net [195.5.6.49]) by mx1.freebsd.org (Postfix) with ESMTP id 5109013C441 for ; Fri, 22 Dec 2006 22:18:42 +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 mail5.ukrtel.net with esmtpa (Exim 4.63) (envelope-from ) id 1GxpJk-0001qP-Ow for freebsd-questions@freebsd.org; Fri, 22 Dec 2006 20:41:26 +0200 Received: from host.my.domain (localhost [127.0.0.1]) by host.my.domain (8.13.7/8.13.6) with ESMTP id kBLJi9K0001587 for ; Thu, 21 Dec 2006 21:44:09 +0200 (EET) (envelope-from a@zeos.net) Received: (from elisej@localhost) by host.my.domain (8.13.7/8.13.6/Submit) id kBLJi9ss001586 for freebsd-questions@freebsd.org; Thu, 21 Dec 2006 21:44:09 +0200 (EET) (envelope-from a@zeos.net) Date: Thu, 21 Dec 2006 21:44:09 +0200 From: a@zeos.net To: freebsd-questions@freebsd.org Message-ID: <20061221194409.GA1515@host.my.domain> Mail-Followup-To: freebsd-questions@freebsd.org References: <20061219195359.GA34750@host.my.domain> <20061221184535.GB40028@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20061221184535.GB40028@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 22:18:42 -0000 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 ? > > Yes, "ls | less" is the way to do it. You can add a shell alias to > make it easier to type: > > alias pls="ls -l | less" > > That's for bourne-style shells (sh,bash,zsh). for csh, you would use > > alias pls "ls | less" > > Another way to do it would be to write a script named pls and put it in > your path: > > #! /bin/sh > ls "$@" | less > > -- > Dan Nelson > dnelson@allantgroup.com 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.