I have been using a shell script which used to do something like this:
output=$(ls -R /logs/{abc,cde}/"$((${date}/100))"/*/out*${date}* | grep -v "Random" )
echo $output
On running this command, I used to get the files with either abc or cde at relevant location. You can ignore other variables like date etc
However, when I modified the script to take abc,cde as command line parameter instead of hardcoding in the script, it stopped working. I changed the command to:
output=$(ls -R /logs/{${list}}/"$((${date}/100))"/*/out*${date}* | grep -v "Random" )
where list is abc,cde
I tried a lot of different combinations of quotes etc but it does not seem to be working. Can someone help please with the correct syntax that it works properly