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 UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 05-22-2002
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline
Unix does a body good.
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
find will work...

You can use find if you use the -prune and/or -only options for find. I see prune is in the UNIX Nutshell book, but the -only option may not be available in some OSs.

They can help you limit your search parameters and prevent recursive directory searches.

if `find . -name "*.F" -prune -only 2>/dev/null |wc -l` -eq 0

This will only search the current direcory and give your comparison.


__________________
My brain is your brain
Reply With Quote