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 -->
  #2 (permalink)  
Old 01-09-2008
Smiling Dragon's Avatar
Smiling Dragon Smiling Dragon is offline Forum Advisor  
Disorganised User
  
 

Join Date: Nov 2007
Location: New Zealand
Posts: 922
Code:
find ./ -name $1 | sed "s@^./@@" > .filestobedeleted
If your find command when using t\* works for you then what you have there looks good enough. Are you remembering to escape the wildcard when passing it to the script? (eg ./yourscript.sh 't\*')

I would generally recommend escaping the entry within the find too though:
Code:
find ./ -name "$1" ...