Doubt ls-l|more

From: Datha (dathak@semsoftindia-samsung.com)
Date: 04/21/03


From: dathak@semsoftindia-samsung.com (Datha)
Date: 21 Apr 2003 00:36:26 -0700

Hi,
I have one new doubt of Unix.
We have the combination of commands called ls -l|more.Can somebody
explain working of this comand. My doubt is, let me list down the
probable steps.
1. Shell will fork one child to execute abve command.
2. Ls executes which will list the directory contents.
3. LS actually has to feed the data into a pipe so that more can use
it.
4. more will read from the pipe and display on Screen.
5. That looks like end of story.
Now my doubt is in step number 3, how 'ls' will feed the data into the
pipe. How 'more' gets info on which is the pipe it has to read.
Can u clear the doubt.
IF POSSIBLE PLEASE cc TO datk@rediffmail.com
-datha



Relevant Pages

  • Re: Doubt ls-l|more
    ... > We have the combination of commands called ls -l|more.Can somebody ... > explain working of this comand. ... Shell will fork one child to execute abve command. ... LS actually has to feed the data into a pipe so that more can use ...
    (comp.unix.questions)
  • Re: Doubt ls-l|more
    ... > I have one new doubt of Unix. ... > We have the combination of commands called ls -l|more.Can somebody ... Shell will fork one child to execute abve command. ... LS actually has to feed the data into a pipe so that more can use ...
    (comp.unix.questions)
  • Re: Shell
    ... I am implementing an UNIX shell. ... When there are pipe of commands ... These commands work fine when executed in isolation. ... understand bash code rite now) So how to fit in the execution of ...
    (comp.unix.programmer)
  • Re: how to write a utility which can be use in pipe?
    ... > in fact, what I feel confused is just how the 'pipe' work, indeed I'm ... You are typing into a terminal, and there is a program, the shell, ... The shell breaks up this text and finds there are two commands separated ... These descriptors constitute the standard input, output, and error. ...
    (comp.unix.shell)
  • Re: [opensuse] A question for the BASH gurus
    ... You can simply detach the first commands by ending them with ... pipe with no reader. ... it's faster than the reader at the other end of the pipe. ...
    (SuSE)