in reply to Re: Using Perl saves time....
in thread Using Perl saves time....
ls -1 | wcIn Re: Using Perl saves time....:
Why did you use -l for the ls?I think your computer is not showing you the difference between a digit one and the letter ell. The original post is an (unnecessary) digit one. You're complaining rightly about the expense of a letter ell long listing (if that was indeed the case).
It's unnecessary because ls has two behaviors, depending on whether the output is a terminal or not (something I count as being broken, but oh well). To a terminal, it columnizes, but to a pipe or file, it's automatically one element per line (classic mode). Thank the idiots at Bezerkley for this abomination. This leads people to believe that they need to add "-1" to get one column, when in fact that's usually not necessary.
As an example, compare "ls" with "ls | cat".
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Using Perl saves time....
by szabgab (Priest) on Jul 18, 2005 at 11:50 UTC | |
|
Re^3: Using Perl saves time....
by fergal (Chaplain) on Jul 18, 2005 at 11:51 UTC | |
|
Re^3: Using Perl saves time....
by Ultra (Hermit) on Jul 18, 2005 at 12:31 UTC | |
by merlyn (Sage) on Jul 18, 2005 at 12:32 UTC | |
by Ultra (Hermit) on Jul 18, 2005 at 12:41 UTC | |
by merlyn (Sage) on Jul 18, 2005 at 12:51 UTC | |
by Ultra (Hermit) on Jul 18, 2005 at 12:55 UTC |