The $ in the search string "file_pattern" instructs the UNIX to select the filename that ends with "file_pattern" which means if the filename in the o/p of m_ls command doesn't end with file_pattern the grep will not output.

The above command looks for the search string "file_pattern" and instructs the UNIX to select the filename that contains "file_pattern" which means if the filename in the o/p of m_ls command contains file_pattern the grep will output.

Copyright 1998-2015 Ziff Davis, LLC (Toolbox.com). All rights reserved. All product names are trademarks of their respective companies. Toolbox.com is not
affiliated with or endorsed by any company listed at this site.