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 -->
  #3 (permalink)  
Old 09-22-2008
osramos osramos is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 21
Ok, it works.

But there are almost 50 directories, with some of them with 4 or 5 files to exclude ( not match ).

Can do this with a FOR cycle or something similar?

osramos

Quote:
Originally Posted by jim mcnamara View Post
You want to find files that DO NOT match the pattern, correct?
ksh allows you to do that:

Code:
#!/bin/ksh
# files that are not named Historicos_Spot_MDI.zip
ls edpst/CargadoresSPOT/!(Historicos_Spot_MDI.zip)
# 
ls edpst/CargadorOmelBroker/!(??????.xls)
#
ls edpst/CargadorOmelReuters/!(CarOmlReuts.xls)