Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • Are you sure that hunspell-en exists? Anyway, you can use apt-cache policy and grep for ^$PACKAGENAME:. Commented Dec 26, 2017 at 23:02
  • @AlexP these are only examples hunspell-en does not exist because they package with country names, hunspell-ar does exist and there are no country-name packages. I need to find the most accurate package for a given country and language. Commented Dec 26, 2017 at 23:03
  • 2
    find is just like apt-cache in this respect - useless return code, success is based on output. Commented Dec 27, 2017 at 3:00
  • 1
    Yes, I agree they're both stemming from the same problem. The chosen answer mentions there mentions -z which sadly isn't a solution here so the use-case-specific problem isn't applicable. And there is no mention of an idiom or constructing a pipeline without using null-termination (not an option on apt-cache) Commented Dec 27, 2017 at 3:21
  • 1
    @EvanCarroll the null termination is entirely optional. I only used it because it's the safest way to deal with filenames, so one would expect find to be used with -print0 and so grep with -z. Since apt-cache isn't giving null-terminated output, you don't need -z. Commented Dec 27, 2017 at 3:55