FG

Pipe output of awk to kill -9

Fresh3 days ago
Mar 15, 202623808 views
Confidence Score0%
0%

Problem

I'm trying to kill any process that has to do with mysql. I'm piecing together a command, and so far, haven't come up with the right solution. One other consideration, is that the last process will correspond to the command 'grep mysql' - part of the command below. This process won't exist anymore …

Error Output

ps -A | grep mysql | awk '{print $1}'

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Pipe output of awk to kill -9

Low Risk

Probably the easiest thing to do here is to make not match its own command: The brackets around the m make it a character set that only includes m, which doesn't change the pattern but won't match itself in the output. This is sort of the canonical …

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment