Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-30-2004, 07:41 AM   #1
LQ Newbie
Registered: Dec 2004
Posts: 11

Rep: Reputation: 0
keeping a count of packages

i have a file which contains the paths of some java 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.....
Old 12-30-2004, 08:11 AM   #2
Senior Member
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36

I don't understand exactly what you wanna do
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 (>,<,|)

Old 12-30-2004, 09:40 PM   #3
LQ Newbie
Registered: Dec 2004
Posts: 11

Original Poster
Rep: Reputation: 0
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.'


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Keeping APT packages from being upgraded pilot1 Linux - General 0 04-12-2004 09:18 AM
Should posts in general count on your post count? Joey.Dale General 16 01-27-2004 01:31 AM
dd: bs=2X , count=?X adam_boz Linux - General 3 10-27-2002 07:18 PM
Keeping track of packages NSKL Slackware 2 06-28-2002 10:23 PM
creating packages (.tgz/.deb/.rpm) How from the source packages? l_9_l Linux - General 1 03-06-2002 06:03 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration