On Fri, 2002-07-12 at 15:56, Joe Nestlerode wrote:
> Thank you, that works beautifully. I modified it slightly to allow a
> user to enter a search pattern on the command line, to wit:
>
> #!/bin/sh
>
> echo -e "Enter a file or pattern to search for...\n"
> read file
>
> for i in `find . -name
Saul,
Thank you, that works beautifully. I modified it slightly to allow a
user to enter a search pattern on the command line, to wit:
#!/bin/sh
echo -e "Enter a file or pattern to search for...\n"
read file
for i in `find . -name "$file"`
do rm -i $i
done
exit 0
Thanks again!
Joe
[EMA
On Fri, 2002-07-12 at 13:13, Joe Nestlerode wrote:
> I'm trying to write a simple script to search a directory tree for a
> file pattern (specified as an argument with a wildcard, ie, testfile* or
> *.jpg), and then delete matching files after first prompting the user
> for a y/n. (yes=delete,
Hello,
I'm trying to write a simple script to search a directory tree for a
file pattern (specified as an argument with a wildcard, ie, testfile* or
*.jpg), and then delete matching files after first prompting the user
for a y/n. (yes=delete, no=don't delete, find the next match)
The followin