LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 0
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
 
Old 12-30-2004, 09:11 AM   #2
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
Hi,

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 (>,<,|)

Oliv'
 
Old 12-30-2004, 10:40 PM   #3
racer_mec
LQ Newbie
 
Registered: Dec 2004
Posts: 11

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


Reply


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 10:18 AM
Should posts in general count on your post count? Joey.Dale General 16 01-27-2004 02:31 AM
dd: bs=2X , count=?X adam_boz Linux - General 3 10-27-2002 08:18 PM
Keeping track of packages NSKL Slackware 2 06-28-2002 11:23 PM
creating packages (.tgz/.deb/.rpm) How from the source packages? l_9_l Linux - General 1 03-06-2002 07:03 PM


All times are GMT -5. The time now is 07:27 PM.

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