The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
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 06-25-2009
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,807
One way:

Code:
#!/bin/ksh
# myscript.sh
filename=$(basename "$1")
[[ ${#filename} -gt 20 ]] && echo "$1"


Code:
find /directory -type f -exec /path/to/myscript.sh {} \;

An external script works as an argument to -exec