This is a follow-up query on allpackages.txt.gz has two different file-sizes?
$ wc -l allpackages.txt
57725 allpackages.txt
I looked at the output and it says 57725 -6 the header files which is the grand total of 57719 packages but as shared in the comments on http://linux.koolsolutions.com/2008/12/19/counting-number-of-packages-under-debian-linux/#comment-10014 the following command should work but doesn't.
$ tail -n +7 allpackages.txt | cut -d’ ‘ -f1 | cut -d’-‘ -f1 | uniq | wc -l
cut: cut: the delimiter must be a single character
Try 'cut --help' for more information.
the delimiter must be a single character
Try 'cut --help' for more information.
0
Can somebody help in couple of ways :-
a. Decoding what the command itself tries to do ? I know that tail
is used to give the last 10 odd words and cut
is when you are trying to remove some sections of the file.
If needed would share the allpackages.txt somewhere so people can figure out the best way to know the unique number of packages therein.
https://www.dropbox.com/sh/9p03q138xx9nxvb/AAAukls-UnxRZwoCPwx4HwLAa?dl=0
-d
parameter to ordinary'
tail -n +7 allpackages.txt | cut -d' ‘ -f1 | cut -d'-‘ -f1 | uniq | wc -l'
but it didn't improve anything. I still got the same error as before. If possible, share how the command should look. @o11c Again the query, how do I check the number of source packages? I'm looking for an easy way. I didn't get the latter part of your answer as well. Even if the number of source packages is small/less/conservative would be ok, just need to have some way to get authoritative answers.-
, and use-d\
for the space.tail -n +7 allpackages.txt | cut -d' -f1 | cut -d' -f1 | uniq | wc -l
that didn't work, I triedtail -n +7 allpackages.txt | cut -d\ -f1 | cut -d\ -f1 | uniq | wc -l
that didn't work. Let's take this section wise and see what works.