Useful CLI tools (bash) for Arch Linux administration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
455 B

  1. #!/bin/bash
  2. ##################################################
  3. # Find a string in package files (Arch Linux)
  4. #
  5. # Usage:
  6. # bash ./findstr.sh <executable name> <searchable string>
  7. #
  8. # For example:
  9. #
  10. # bash ./findstr.sh makepkg E_USER_FUNCTION_FAILED
  11. ##################################################
  12. for file in $(pacman -Ql $(pacman -Qo $(which "${1}") | awk '{print $($NF)}') | awk '{print $2}' | sed '/\/$/d'); do
  13. grep -ril "{2}" ${file}
  14. done