LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 07: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, 08: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, 09: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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:25 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
Open Source Consulting | Domain Registration