I have a very small script called `processKiller` which kills a process given a partial name match on a running service. 

Right now, I have as my script: 

```
ARG=$1
sudo pkill -f $ARG -9

```

And this works. It just prints `killed`, whether it kills something or not. However, I want to be able to set a var to the user's input, if it is able to find a process with the partial match. So say I have a process called `MyProcess-01-02` and the user types in their cmd line: 

> 
> processKiller.sh MyPro 
> 
> 
> 

I would like it to output: 

> 
> Killed: MyProcess-01-02
> 
> 
> 

I thought of something like this, but it's not setting the variable correctly. Any ideas? 

```
ARG=$1
SERVICE = -f $ARG
sudo pkill -f $SERVICE -9
echo "Killed: $SERVICE"

```

Also, would there be any way to run an "if" check on the SERVICE variable once found to only kill if it is indeed already running?