It works fine when I wrote this code on bash shell
mv -v `pwd`/!(.git) `pwd`/NewDir
But if I create shell script file like below,(name of this file is "s.sh")
#!/bin/bash
mv -v `pwd`/!(.git) `pwd`/NewDir
it returns error
./s.sh: line 2: syntax error near unexpected token `('
./s.sh: line 2: `mv -v `pwd`/(!.git) `pwd`/NewDir'
How can I fix it?