Why 'ls' differs in pipe command

From: Binary (binary.chen_at_gmail.com)
Date: 04/11/05


Date: 10 Apr 2005 22:12:01 -0700

Hi all,

I watched that when I type 'ls' in shell, the filename and dir name can
be colored and each line contains many entries, but when I issue 'ls
|myread', I only can read plan text and one entry per line, what causes
this difference?

Any help appreciated!

Binary Chen



Relevant Pages

  • Re: Why ls differs in pipe command
    ... > I watched that when I type 'ls' in shell, the filename and dir name can ... > |myread', I only can read plan text and one entry per line, what causes ... Department of Computer Science ...
    (comp.os.linux.development.apps)
  • Re: csh and tcsh: globbing / redirection order bug?
    ... That command above opens a new "filename" file for writing, ... grep will process its arguments and writes its output ... shell is no longer involved, ... The command above, when executed in csh in a directory where "filename" does not already exist, creates a new file, expands the star to a list of file including the new file "filename", and passes that list to grep, with stdout open to the new file. ...
    (comp.unix.shell)
  • Re: reading multiple files
    ... that the reaction to your perfectly legitimate question was to say: ... should use your shell to do this, and shells are off-topic, clear off. ... Yes, you've got the filename. ... you've also got a newline ...
    (comp.lang.c)
  • Re: bypass shell - pipe into child pid and receive otput
    ... Passing '-' as the filename works as a shell command, ... convention that many programs support a filename of - to mean stdin (or ... If, as you say, passing '-' directly to htmldoc would have worked, then ...
    (comp.lang.perl.misc)
  • Re: pointing best size directories to burn a cdrom bash script
    ... >I guess it doesn't work because the shell sees two words in it: ... that's just the first stage ... >tokenization that fails. ... Filename globbing doesn't find anything that matches that single-token_pattern_ ...
    (comp.unix.shell)