#! /bin/sh IFS=$'\n' filelist=($(cat)) printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-provides "$@" for file in "${filelist[@]}"; do case "$file" in */symsets-*.tar.gz) flavor=${file%.tar.gz} flavor=${flavor##*-} for symset in $(tar tfz "$file" | grep -v '/$'); do class=${symset##*/} ; class=${class%.*} echo "kernel($flavor:$class) = ${symset##*.}" done ;; esac done