Re: Is there UNIX analog of ftp command pls?
[EMAIL PROTECTED] wrote: 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 ? 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 [EMAIL PROTECTED] 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 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Is there UNIX analog of ftp command pls?
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]"
Re: Is there UNIX analog of ftp command pls?
pls directory will give ls -l | less directory which is not what one want. Try the following: bourne shells: alias pls='ls $* | less' or for csh/tcsh: alias pls 'ls $* | less' Thanks, Josh ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Is there UNIX analog of ftp command pls?
On Thu, 21 Dec 2006, Eric Kjeldergaard wrote: 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" The csh/tcsh equivalent is alias pls 'ls -l \!* | less' -Warren Block * Rapid City, South Dakota USA ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Is there UNIX analog of ftp command pls?
On 12/21/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: 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 ? > > 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 > [EMAIL PROTECTED] 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. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Is there UNIX analog of ftp command pls?
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] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Is there UNIX analog of ftp command pls?
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 ? > > 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 > [EMAIL PROTECTED] 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. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Is there UNIX analog of ftp command pls?
On Tue, Dec 19, 2006 at 09:53:59PM +0200, [EMAIL PROTECTED] wrote: > Is there UNIX analog of ftp command pls, i. e. ls | less ? the BSD version of ftp(1) has the pls command (pdir is also a synonym to it). -- Raymond Pasco <[EMAIL PROTECTED]> Mobile: +1 860 335 5022 (SMS only please) By receiving this email, you are agreeing to my terms and conditions, which can be found at: http://lambda.cultofray.net/~ray/terms.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Is there UNIX analog of ftp command pls?
In the last episode (Dec 19), [EMAIL PROTECTED] 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 [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Is there UNIX analog of ftp command pls?
On Tue, Dec 19, 2006, [EMAIL PROTECTED] wrote: >Is there UNIX analog of ftp command pls, i. e. ls | less ? There's a Windows analog of the UNIX ftp command (pretty much everything from DOS 2.0 on was taken from UNIX starting with the hierarchical file system). Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 ``The only freedom which deserves the name, is that of pursuing our own good in our own way, so long as we do not attempt to deprive others of theirs, or impede their efforts to obtain it.'' -- John Stuart Mill, 1859 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Is there UNIX analog of ftp command pls?
Is there UNIX analog of ftp command pls, i. e. ls | less ? Elisey Babenko ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"