file seach from pulseaudio module list

view story

http://www.unix.com – Hi Guys,I admit my knowledge in this area is awful, :( I'm trying to get the alsa card number from within the text returned by running pactl list cards Alsa card numbers from running aplay -l and above do not match. I'm attempting to get a match on the PA card list with the type of sound card, and then once the card is found by matching "alsa.card ="n", where n is the card number with the alsa card number from aplay -l, which I have stored as a variable . Then when the PA card is identified to get the module number. The first few lines returned by "pactl list cards" (HowTos)