From owner-freebsd-questions@FreeBSD.ORG Thu Dec 21 21:03: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 [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7291216A51F for ; Thu, 21 Dec 2006 21:03:20 +0000 (UTC) (envelope-from kjelderg@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by mx1.freebsd.org (Postfix) with ESMTP id 5C16B13C442 for ; Thu, 21 Dec 2006 21:03:19 +0000 (UTC) (envelope-from kjelderg@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so2388488uge for ; Thu, 21 Dec 2006 13:03:18 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Wy/TnT4JnCw3EtOofmJrVEdmdVEAiyyQirQhB/nuffFPT/79+wXjBvz2P9Hm2pPo95W17ohMVzbKKMt2dDs6N4O19p0A7naeNi7TtIvtUCbxw97FY8Amix1RsA6MCQky7DoAqMs6VRK0DQRF1rGwvaHr2hj63pCwB4znp3oSrts= Received: by 10.66.248.5 with SMTP id v5mr11362800ugh.1166733331107; Thu, 21 Dec 2006 12:35:31 -0800 (PST) Received: by 10.67.10.4 with HTTP; Thu, 21 Dec 2006 12:35:30 -0800 (PST) Message-ID: Date: Thu, 21 Dec 2006 14:35:30 -0600 From: "Eric Kjeldergaard" To: freebsd-questions@freebsd.org In-Reply-To: <20061221194409.GA1515@host.my.domain> MIME-Version: 1.0 References: <20061219195359.GA34750@host.my.domain> <20061221184535.GB40028@dan.emsphone.com> <20061221194409.GA1515@host.my.domain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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 21:03:20 -0000 On 12/21/06, a@zeos.net wrote: > > 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. To find the answer to this, you need only look at both of those solutions and combine them. For instance... alias pls="ls -l $@ | less" -- If I write a signature, my emails will appear more personalised.