ls *.jar | grep test
Sometimes i like to run a certain command on these filtered results. I achieve this by :
ls *.jar | grep test | while read line; do sha1sum "$line"; done
The generic form is :
<command generating a file list> | grep <filter keyword> | while read line; do <command> "$line"; done