Is there UNIX analog of ftp command pls?

a at zeos.net a at zeos.net
Fri Dec 22 12:43:05 PST 2006


On Thu, Dec 21, 2006 at 02:42:37PM -0600, Dan Nelson wrote:
> 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

It is interesting idea!



More information about the freebsd-questions mailing list