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*

6
  • What are these supposed to do? -exec looks what you'd use with find, what does kill have to do with it? Do you just want to pipe kill to grep? Commented Jun 24, 2022 at 12:27
  • @muru The way I understood was that -exec acts on the output of an another command ( the command being kill -l) which returns the output of kill signals. From there, I want to find all those kill signals which contain the terminate (term) keyword. Commented Jun 24, 2022 at 12:28
  • 2
    There is no generic -exec - find has a -exec which runs commands, but I don't know of other commands that have such an option. Do you just want to do kill -l | grep ...? Commented Jun 24, 2022 at 12:29
  • @muru yes, that's basically what I wanted to do but with the -exec command. So, -exec is available only with the find command? Commented Jun 24, 2022 at 12:30
  • 2
    Yes, because -exec is not a command. There is an exec command but you can't use either of them as options to random commands and expect them to work. Commented Jun 24, 2022 at 12:32