2 Wrapped code.
source | link
find /tmp/test -name '*.txt' \
 -exec bash -c './thulac < "$(readlink -f {})" > "/mnt/tokenized/$(basename {})"' \;

Use find to search for files and to execute commands on the results. With bash -c 'command' you are able to execute multiple $().

Use readlink -f {} to create the full path to the result.

Use basename {} to strip the path from the result.

find /tmp/test -name '*.txt' -exec bash -c './thulac < "$(readlink -f {})" > "/mnt/tokenized/$(basename {})"' \;

Use find to search for files and to execute commands on the results. With bash -c 'command' you are able to execute multiple $().

Use readlink -f {} to create the full path to the result.

Use basename {} to strip the path from the result.

find /tmp/test -name '*.txt' \
 -exec bash -c './thulac < "$(readlink -f {})" > "/mnt/tokenized/$(basename {})"' \;

Use find to search for files and to execute commands on the results. With bash -c 'command' you are able to execute multiple $().

Use readlink -f {} to create the full path to the result.

Use basename {} to strip the path from the result.

1
source | link

find /tmp/test -name '*.txt' -exec bash -c './thulac < "$(readlink -f {})" > "/mnt/tokenized/$(basename {})"' \;

Use find to search for files and to execute commands on the results. With bash -c 'command' you are able to execute multiple $().

Use readlink -f {} to create the full path to the result.

Use basename {} to strip the path from the result.