add md5sum example to README

this includes a statement that `fd` will not interlace or garble the terminal output from its multiple threads
This commit is contained in:
Tom Eichlersmith 2022-08-30 08:04:35 -05:00 committed by David Peter
parent ff77a2e29e
commit c9db74bfd4
1 changed files with 7 additions and 0 deletions

View File

@ -206,6 +206,13 @@ fd -e jpg -x convert {} {.}.png
Here, `{}` is a placeholder for the search result. `{.}` is the same, without the file extension.
See below for more details on the placeholder syntax.
The terminal output of commands run from parallel threads using `-x` will not be interlaced or garbled,
so `fd -x` can be used to rudimentarily parallelize a task run over many files.
An example of this is calculating the checksum of each individual file within a directory.
```
fd -x md5sum
```
#### Placeholder syntax
The `-x` and `-X` options take a *command template* as a series of arguments (instead of a single string).