LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Using rpm command to count the numbers of license..... (https://www.linuxquestions.org/questions/linux-newbie-8/using-rpm-command-to-count-the-numbers-of-license-791961/)

toshitaka 02-27-2010 09:41 AM

Using rpm command to count the numbers of license.....
 
Hi,
I am a newbie in Linux

Here is my question....
------------------------
Create the file ~/license_counts, which tables the number of occurrences of packages which are licensed under a given license, for the top 5 most commonly used licenses, sorted in numerically descending order. If performed correctly, your file should be formatted similarly to the following. (Do not be concerned if the actual counts or license names are different. Also, you might notice logically similar licenses, such as LGPL/GPL and GPL/LGPL. Do not make any attempt to combine them into a single entry.)

The resulted format:
------------------------
[prince@station prince]$ cat license_counts
355 GPL
147 LGPL
53 BSD
47 distributable
18 xorg

any way to do this? i tried some method but cannot get it to work.
Thank You.

evo2 02-27-2010 09:43 AM

Dude, read the forum rules. Specifically regarding home work questions.

Evo2.

chrism01 02-28-2010 07:55 PM

IOW; show us what you've tried ...


All times are GMT -5. The time now is 05:42 PM.