To store the file name o/p from find command in to a variable

Hi

How to use a variable to store the filename of a file which was found by the 'find' command.

can this be practical-->var = find . -name "filename.dat"

Please help..

This is asked often in the forum; here is a thread explaining it:

Use the search function of the forum first please, thank you.