In xonsh I can run a find command like this:
find @(str(path)) -iname "log.txt"
Where path is a pathlib.Path object.
However, I don't understand how to use the -exec and -execdir options on find:
find @(str(path)) -iname "log.txt" -execdir pwd {} \;
This results in the error:
SyntaxError: <xonsh-code>:1:5: ('code: @(',)
I reviewed Tutorial — xonsh 0.10.1.dev5.dev5 documentation and tried @$(...) and numerous other variations without any success.
Edit: this version
find @(str(path)) -iname "log.txt" -execdir pwd '{}' \;
gives this error:
find: missing argument to `-execdir'
Just adding the answer here for future reference:
This
bashbecomes this
xonshit seems...Though this also seem to work :-D :