When I run the script, I get the error message that grep
was used wrongly, what's wrong with the script?
Code:
#!/bin/bash
read $ALVO
RESULTADO=$(ps -A | grep $ALVO)
$RESULTADO kill -KILL
Error message:
sublime
Uso: grep [OPÇÃO]... PADRÃO [ARQUIVO]...
Experimente "grep --help" para mais informações.
kill: uso: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... ou kill -l [sigspec]
Note: Here the sublime was a test