I am trying to make an executable script on Mac where it searches for a file and makes that the current directory (cd
) and then runs some more commands. I started with
find . -type d -name "MCsniperPY-master" -exec cd {}
And it says I need a + or a ;
- I add a
+
and the cmd does nothing, - I add a
;
and it says I need a+
or;
I am pretty new to Unix coding, so if there is a better way to do this let me know.
cd
is not an external command in this other question): https://unix.stackexchange.com/questions/447965/find-exec-cd-gives-error-find-cd-no-such-file-or-directory – Kusalananda Sep 05 '20 at 07:20