I'm trying to execute the following command using subprocess module (python)
/usr/bin/find <filepath> -maxdepth 1 -type f -iname "<pattern>" -exec basename {} \;
But, it gives the following error :
/usr/bin/find: missing argument to `-exec'
I am guessing it's to do with escaping some characters. But not getting how to get over this.
Any help is appreciated. Thanks.