Mine
public text v1 · immutable#!/bin/bash
#Asche
read -p "Elija el nombre del programa: " PROG
kill "$( ps -A | grep -w $PROG | grep -v grep | awk '{ print $1 }')"
if [ $? -eq 0 ]; then
echo El proceso $PROG se ha matado Correctamente; else
echo Error - Escriba el nombre correcto del Programa
fi