Goal: get all mp4 names in a directory and store them in a variable.
I want to get the output of find command with some variables(arguments passed in)
dir='.'
search="-iname '*.mp4'"
find . -iname '*.mp4'             # works but need to use variable instead of hard code
find $dir $search                 # failed
output=$(find $. "$search")       # failed
...                               # all failed
 
    