bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

count


From: Krem
Subject: count
Date: Fri, 18 Dec 2015 18:05:43 -0700 (MST)

Hi all,

I have one folder and this folder contains several folders. Each sub folders  
contains 5 or 6 files.   So i want count the number of  rows within  each
file  and produce an output.

Assume the main folder called A   and it  has three subfolders   folder1,
folder2 and folder3.
Folder1 has 4 files:   file1, file2,  file3   and file4. 

The same thing is for folder2 and folder3.
Assume that file1 has 36 rows ( wc -l file1) =36.
Assume that file2 has 50 rows ( wc -l file2) =50.
Assume that file3 has 36 rows ( wc -l file3) =120.
Assume that file4 has 50 rows ( wc -l file4) =15.


I want the output  
mainfolder  subfiolder   filename   # of rows

A               Folder1        file1            36                     
A               Folder1       file2             50                     
A               Folder1       file3            120                     
A               Folder1       file4            15            
A               folder 2     filename1         ..
..
..
..
A            last_folder    lasfilename    ... .

Can anyone help me out?

Thanks in advance


        

                      



--
View this message in context: 
http://gnu-bash.2382.n7.nabble.com/count-tp16675.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]