Posted By

javierperez on 09/22/10


Tagged

command Shell Bash ubuntu debian Package dpkg


Versions (?)

conocer a qué paquete pertenece un comando


 / Published in: Bash
 

URL: http://javierperez.eu/taller-ubuntu-conocer-a-que-paquete-pertenece-un-comando/

  1. #!/bin/bash
  2. COMMAND=$1
  3.  
  4. CMDPATH=`which $COMMAND`
  5. if [ -z "$CMDPATH" ]; then
  6. echo "Comando no encontrado"
  7. exit 1
  8. fi
  9.  
  10. CMDPKG=`dpkg -S $CMDPATH | cut -d":" -f1`
  11.  
  12. dpkg -s $CMDPKG

Report this snippet  

You need to login to post a comment.