LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   keeping a count of packages (https://www.linuxquestions.org/questions/linux-newbie-8/keeping-a-count-of-packages-271863/)

racer_mec 12-30-2004 07:41 AM

keeping a count of packages
 
hi,
i have a file which contains the paths of some java file.is there some way i can count the no of packages used(imported into those java files)...i mean how can i keep a count because many files import the same packages right.somebody please help.....
regards
racer

Oliv' 12-30-2004 08:11 AM

Hi,

I don't understand exactly what you wanna do :scratch:
But I think a bash script can do the trick with commands like "wc" (to count the number of lines, words, char... in a file), "grep" (to catch a pattern in a file) and the redirection operators (>,<,|)

Oliv'

racer_mec 12-30-2004 09:40 PM

hi
its ok.actually i wanted to count the number of java files in a directory which imports java.util .*;
and i did it with the xargs statement
find - name "*.java" | xargs | grep 'java.util.'
regards
racer


All times are GMT -5. The time now is 03:51 PM.