"Josh Diakun" <(E-Mail Removed)> wrote:
>Floyd L. Davidson wrote:
>> "Josh Diakun" <(E-Mail Removed)> wrote:
>> >(E-Mail Removed) wrote:
>> >> my schools linux client to connect to a linux server but ls | more
>> >> doesn't work. When ever I do ls | more it comes up with this: output to
....
>> >Your just missing one thing here with your command...quotes.
>> >
>> >To output the listing to `less` or `more` you have to use quotes before
>> >and after the pipe like so:
>> >
>> >ls * "|more"
>> >
>> >then that will work as you need it to.
>>
>> The quotes are unnecessary, and it will work just fine without them.
>
>The quotes are needed to protect against if the user happens to type a
>space between the pipe and the file viewer.
As you can plainly see, the quotes are not needed because there
is *no* space in the second argument to the ls command. The
statement that all the original "ls | more" needed was quotes is
absolutely not correct.
It is true that if you do want to use a space as part of the
command, that is the way to do it. But that was not the
question nor was it part of the stated answer given.
>Because without the quotes
>ls * | more does not work, it rather tries to pipe the output of ls *
>to a file.
No, it does not pipe anything; which is exactly the problem. It
just accepts the last argument as a filename.
>Although, you are right, the quotes are not needed when
>there is no space, like so: ls * |more but the asterisk, or a period,
>is needed to indicate what to list.
That is of course true whether there are quotes or not. but the
reason is because ls requires either no args, or more than one.
It will not work with only one arg.
--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)
(E-Mail Removed)