On 16:38 23 Sep 2002, Spanke, Alexander <[EMAIL PROTECTED]> wrote:
| Hi again,
|
| How can i count the lines of a text file and store it in a variable. But i
| should use the bash, so no perl, python script should it be.
|
| Now i use
| wc -l < file.txt | read dummy
|
| But it doesn't wo
Spanke, Alexander wrote:
> Hi again,
>
> How can i count the lines of a text file and store it in a variable. But i
> should use the bash, so no perl, python script should it be.
>
> Now i use
> wc -l < file.txt | read dummy
>
> But it doesn't work :(
>
> Any ideas ?
>
> Regards / thnx
On Mon, Sep 23, 2002 at 04:38:21PM +0200, Spanke, Alexander wrote:
>
> How can i count the lines of a text file and store it in a variable. But i
> should use the bash, so no perl, python script should it be.
[seyman@munshine seyman]$ linecount=`wc -l < file.txt`
[seyman@munshine seyman]$ echo $
: Monday, September 23, 2002 11:38 AM
Subject: Counting lines of a textfile
> Hi again,
>
> How can i count the lines of a text file and store it in a variable. But i
> should use the bash, so no perl, python script should it be.
>
> Now i use
> wc -l < file.txt | read dummy
Hi again,
How can i count the lines of a text file and store it in a variable. But i
should use the bash, so no perl, python script should it be.
Now i use
wc -l < file.txt | read dummy
But it doesn't work :(
Any ideas ?
Regards / thnx
Alex
---