Tried to create a script to delete files from the directory in a first script argument that does not contain a sequence of symbols in a second script argument. But It doesn't do a thing. What I tried:
find $1 -name !\(.*$2.*\) | tee file | cat
Where am I wrong?