|
From: | Andreas Erb |
Subject: | Difficulty with wc |
Date: | Mon, 08 Apr 2002 16:13:49 +0200 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.9+) Gecko/20020407 |
Hi, wc -ldoes give a result with leading blanks. This makes it difficult to work with the result in scripts, like:
N=$(ls | wc -l) to know the number of entries in a directory.I now get arround it with sed - but it seems quite uncomfortable to invoke another time consuming program just to "clean up" a simple result.
Regards Hearp
[Prev in Thread] | Current Thread | [Next in Thread] |