Skip to main content
added 4 characters in body
Source Link
MathMan
  • 191
  • 2
  • 10

I am trying to execute the following command in which I use the kill and exec commands.

kill -l -exec grep -i 'term' {} + 

Since, kill -l returns a list of all kill signals, I want to find all those signals which contain the word 'term' using grep with case insensitive -i flagSince, kill -l returns a list of all kill signals, I want to find all those signals which contain the word 'term' using grep with case insensitive -i flag. But, it returns the following errors. Could someone advise why could this be?

-bash: kill: grep: invalid signal specification -bash: kill: -i: invalid signal specification 15 -bash: kill: {}: invalid signal specification -bash: kill: +: invalid signal specification 

I am trying to execute the following command in which I use the kill and exec commands.

kill -l -exec grep -i 'term' {} + 

Since, kill -l returns a list of all kill signals, I want to find all those signals which contain the word 'term' using grep with case insensitive -i flag. But, it returns the following errors. Could someone advise why could this be?

-bash: kill: grep: invalid signal specification -bash: kill: -i: invalid signal specification 15 -bash: kill: {}: invalid signal specification -bash: kill: +: invalid signal specification 

I am trying to execute the following command in which I use the kill and exec commands.

kill -l -exec grep -i 'term' {} + 

Since, kill -l returns a list of all kill signals, I want to find all those signals which contain the word 'term' using grep with case insensitive -i flag. But, it returns the following errors. Could someone advise why could this be?

-bash: kill: grep: invalid signal specification -bash: kill: -i: invalid signal specification 15 -bash: kill: {}: invalid signal specification -bash: kill: +: invalid signal specification 
Source Link
MathMan
  • 191
  • 2
  • 10

Using -exec with kill command

I am trying to execute the following command in which I use the kill and exec commands.

kill -l -exec grep -i 'term' {} + 

Since, kill -l returns a list of all kill signals, I want to find all those signals which contain the word 'term' using grep with case insensitive -i flag. But, it returns the following errors. Could someone advise why could this be?

-bash: kill: grep: invalid signal specification -bash: kill: -i: invalid signal specification 15 -bash: kill: {}: invalid signal specification -bash: kill: +: invalid signal specification