On Thu, Dec 21, 2006 at 02:42:37PM -0600, Dan Nelson wrote:
> In the last episode (Dec 21), [EMAIL PROTECTED] said:
> > On Thu, Dec 21, 2006 at 12:45:35PM -0600, Dan Nelson wrote:
> > > In the last episode (Dec 19), [EMAIL PROTECTED] 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
>       [EMAIL PROTECTED]

It is interesting idea!

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to