Is there UNIX analog of ftp command pls?
Garrett Cooper
youshi10 at u.washington.edu
Fri Dec 22 14:59:02 PST 2006
a at zeos.net wrote:
> On Thu, Dec 21, 2006 at 12:45:35PM -0600, Dan Nelson wrote:
>
>> In the last episode (Dec 19), a at 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 at 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.
Put tildes (`) around the command alias maybe, or make the pls into a
script?
-Garrett
More information about the freebsd-questions
mailing list