Is there UNIX analog of ftp command pls?
Dan Nelson
dnelson at allantgroup.com
Thu Dec 21 12:42:38 PST 2006
In the last episode (Dec 21), a at zeos.net said:
> 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 ?
>
> 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 at allantgroup.com
More information about the freebsd-questions
mailing list