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