0

How can I count all the python and shell scripts in my whole system?

  • 1
    It's a big job. Why would you want to? – WinEunuuchs2Unix Nov 21 '19 at 18:05
  • 6
    This sounds like a X-Y Problem. Why do you want to do this? It's usually better to explain what you want to achive. – vidarlo Nov 21 '19 at 18:06
  • What have you tried so far? – Eduardo Trápani Nov 21 '19 at 18:06
  • Define what a shell script looks like to Linux. 2) Define what a Python script looks like to Linux. 3) Find a command which traverses the portion of your filesystem where either might be stored, to count all of them. 4) Click [edit] and show us the code you've written to do that, so we can help you make it work perfectly.
  • – K7AAY Nov 21 '19 at 18:06
  • 2
    I've voted to reopen this. It isn't unclear. Regarding the possibility that it may be off-topic as "a problem that can't be reproduced": a plain reading of that close reason makes clear it does not apply. But this wouldn't have qualified for closure even under the old, broader "too localized." It's strange to count all scripts of two (and only two) kinds, in one's whole system, but it applies to any system. More importantly, solutions to this apply to the much more common and useful problems of finding and counting scripts of a single language (or many languages) in a smaller directory. – Eliah Kagan Nov 22 '19 at 03:36
  • @EliahKagan I've voted to reopen as well. Voting to close as "unclear" would be the wrong reason. A possible reason might be "You really don't need to know this" however that is not for us to judge. A better question might be "show me all files that are POSIX shell script, UTF-8 Unicode text executable" or other details that file command returns. A good use case is someone needs to search for specific file types during a system conversion project. It is possible some people voted to close as "unclear" because they didn't know how to do it. But that isn't a valid reason. – WinEunuuchs2Unix Nov 22 '19 at 12:02