# !/bin/bash input="./requirements.txt" while IFS= read -r line do pacman -S --noconfirm python-"${line,,}" if [ $? -ne 0 ]; then yay -S --noconfirm python-"${line,,}" # echo "Could not create file" >&2 fi done < "$input"