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.