Re: Counting lines of a textfile

2002-09-27 Thread Cameron Simpson
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

Re: Counting lines of a textfile

2002-09-23 Thread Francisco Neira
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

Re: Counting lines of a textfile

2002-09-23 Thread Emmanuel Seyman
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 $

Re: Counting lines of a textfile

2002-09-23 Thread Bruno Negrao
: 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

Counting lines of a textfile

2002-09-23 Thread Spanke, Alexander
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 ---