The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 10-10-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,313
I guess it can't find anything since you can't write a regular expression for grep like you use metacharacters in the shell. Try this:

Code:
file="TEST01_.*\.mqsc"

Your former code meant _* which stands for zero or <n> occurences of _. And just a dot means any single character, not a dot. So the dot has to be escaped.

Oh and maybe use "ls -1" to have 1 file per row.