|
57 | 57 | - **Settable records sending to every command** (`-n`, default `1`). (`-n/--max-args` in GNU parallel) |
58 | 58 | - **Settable field delimiter** (`-d`, default `\s+`). (Same `-d/--delimiter` in GNU parallel) |
59 | 59 | - **Practical replacement strings** (like GNU parallel): |
| 60 | + - `{{}}`, "{}" itself |
60 | 61 | - `{#}`, job ID. (Same in GNU parallel) |
61 | 62 | - `{}`, full data. (Same in GNU parallel) |
62 | 63 | - `{n}`, `n`th field in delimiter-delimited data. (Same in GNU parallel) |
@@ -96,20 +97,20 @@ Note that speed is not the #.1 target, especially for processes that last long. |
96 | 97 |
|
97 | 98 | #### Method 1: Download binaries |
98 | 99 |
|
99 | | -[rush v0.5.7](https://github.com/shenwei356/rush/releases/tag/v0.5.7) |
100 | | -[](https://github.com/shenwei356/rush/releases/tag/v0.5.7) |
| 100 | +[rush v0.6.0](https://github.com/shenwei356/rush/releases/tag/v0.6.0) |
| 101 | +[](https://github.com/shenwei356/rush/releases/tag/v0.6.0) |
101 | 102 |
|
102 | 103 | ***Tip: run `rush -V` to check update !!!*** |
103 | 104 |
|
104 | 105 | OS |Arch |File, (中国镜像) |Download Count |
105 | 106 | :------|:---------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
106 | | -Linux |32-bit |[rush_linux_386.tar.gz](https://github.com/shenwei356/rush/releases/download/v0.5.7/rush_linux_386.tar.gz), ([mirror](http://app.shenwei.me/data/rush/rush_linux_386.tar.gz)) |[](https://github.com/shenwei356/rush/releases/download/v0.5.7/rush_linux_386.tar.gz) |
107 | | -Linux |**64-bit**|[**rush_linux_amd64.tar.gz**](https://github.com/shenwei356/rush/releases/download/v0.5.7/rush_linux_amd64.tar.gz), ([mirror](http://app.shenwei.me/data/rush/rush_linux_amd64.tar.gz)) |[](https://github.com/shenwei356/rush/releases/download/v0.5.7/rush_linux_amd64.tar.gz) |
108 | | -Linux |**arm64** |[**rush_linux_arm64.tar.gz**](https://github.com/shenwei356/rush/releases/download/v0.5.7/rush_linux_arm64.tar.gz), ([mirror](http://app.shenwei.me/data/rush/rush_linux_arm64.tar.gz)) |[](https://github.com/shenwei356/rush/releases/download/v0.5.7/rush_linux_arm64.tar.gz) |
109 | | -OS X |**64-bit**|[**rush_darwin_amd64.tar.gz**](https://github.com/shenwei356/rush/releases/download/v0.5.7/rush_darwin_amd64.tar.gz), ([mirror](http://app.shenwei.me/data/rush/rush_darwin_amd64.tar.gz)) |[](https://github.com/shenwei356/rush/releases/download/v0.5.7/rush_darwin_amd64.tar.gz) |
110 | | -OS X |**arm64** |[**rush_darwin_arm64.tar.gz**](https://github.com/shenwei356/rush/releases/download/v0.5.7/rush_darwin_arm64.tar.gz), ([mirror](http://app.shenwei.me/data/rush/rush_darwin_arm64.tar.gz)) |[](https://github.com/shenwei356/rush/releases/download/v0.5.7/rush_darwin_arm64.tar.gz) |
111 | | -Windows|32-bit |[rush_windows_386.exe.tar.gz](https://github.com/shenwei356/rush/releases/download/v0.5.7/rush_windows_386.exe.tar.gz), ([mirror](http://app.shenwei.me/data/rush/rush_windows_386.exe.tar.gz)) |[](https://github.com/shenwei356/rush/releases/download/v0.5.7/rush_windows_386.exe.tar.gz) |
112 | | -Windows|**64-bit**|[**rush_windows_amd64.exe.tar.gz**](https://github.com/shenwei356/rush/releases/download/v0.5.7/rush_windows_amd64.exe.tar.gz), ([mirror](http://app.shenwei.me/data/rush/rush_windows_amd64.exe.tar.gz))|[](https://github.com/shenwei356/rush/releases/download/v0.5.7/rush_windows_amd64.exe.tar.gz) |
| 107 | +Linux |32-bit |[rush_linux_386.tar.gz](https://github.com/shenwei356/rush/releases/download/v0.6.0/rush_linux_386.tar.gz), ([mirror](http://app.shenwei.me/data/rush/rush_linux_386.tar.gz)) |[](https://github.com/shenwei356/rush/releases/download/v0.6.0/rush_linux_386.tar.gz) |
| 108 | +Linux |**64-bit**|[**rush_linux_amd64.tar.gz**](https://github.com/shenwei356/rush/releases/download/v0.6.0/rush_linux_amd64.tar.gz), ([mirror](http://app.shenwei.me/data/rush/rush_linux_amd64.tar.gz)) |[](https://github.com/shenwei356/rush/releases/download/v0.6.0/rush_linux_amd64.tar.gz) |
| 109 | +Linux |**arm64** |[**rush_linux_arm64.tar.gz**](https://github.com/shenwei356/rush/releases/download/v0.6.0/rush_linux_arm64.tar.gz), ([mirror](http://app.shenwei.me/data/rush/rush_linux_arm64.tar.gz)) |[](https://github.com/shenwei356/rush/releases/download/v0.6.0/rush_linux_arm64.tar.gz) |
| 110 | +OS X |**64-bit**|[**rush_darwin_amd64.tar.gz**](https://github.com/shenwei356/rush/releases/download/v0.6.0/rush_darwin_amd64.tar.gz), ([mirror](http://app.shenwei.me/data/rush/rush_darwin_amd64.tar.gz)) |[](https://github.com/shenwei356/rush/releases/download/v0.6.0/rush_darwin_amd64.tar.gz) |
| 111 | +OS X |**arm64** |[**rush_darwin_arm64.tar.gz**](https://github.com/shenwei356/rush/releases/download/v0.6.0/rush_darwin_arm64.tar.gz), ([mirror](http://app.shenwei.me/data/rush/rush_darwin_arm64.tar.gz)) |[](https://github.com/shenwei356/rush/releases/download/v0.6.0/rush_darwin_arm64.tar.gz) |
| 112 | +Windows|32-bit |[rush_windows_386.exe.tar.gz](https://github.com/shenwei356/rush/releases/download/v0.6.0/rush_windows_386.exe.tar.gz), ([mirror](http://app.shenwei.me/data/rush/rush_windows_386.exe.tar.gz)) |[](https://github.com/shenwei356/rush/releases/download/v0.6.0/rush_windows_386.exe.tar.gz) |
| 113 | +Windows|**64-bit**|[**rush_windows_amd64.exe.tar.gz**](https://github.com/shenwei356/rush/releases/download/v0.6.0/rush_windows_amd64.exe.tar.gz), ([mirror](http://app.shenwei.me/data/rush/rush_windows_amd64.exe.tar.gz))|[](https://github.com/shenwei356/rush/releases/download/v0.6.0/rush_windows_amd64.exe.tar.gz) |
113 | 114 |
|
114 | 115 |
|
115 | 116 | Just [download](https://github.com/shenwei356/rush/releases) compressed |
@@ -195,6 +196,7 @@ Replacement strings in commands: |
195 | 196 | {:} remove all file extensions. |
196 | 197 | {^suffix} remove suffix |
197 | 198 | {@regexp} capture submatch using regular expression |
| 199 | + {{}} "{}" itself |
198 | 200 |
|
199 | 201 | Combinations: |
200 | 202 | {%.}, {%:} basename without extension |
@@ -351,6 +353,22 @@ Flags: |
351 | 353 | python: can't open file 'unexisted_script.py': [Errno 2] No such file or directory |
352 | 354 | [ERRO] wait command: python unexisted_script.py: exit status 2 |
353 | 355 |
|
| 356 | +1. Input containing `{}` (since v0.6.0) |
| 357 | + |
| 358 | + $ echo "a attr{href}"="h4 text{}" | rush -T b -k -D "=" 'echo "{}"' |
| 359 | + a attr{href} |
| 360 | + h4 text{} |
| 361 | + |
| 362 | + $ echo -ne "a{},b{{}},c{d}" | rush -D , -k "echo {}" |
| 363 | + a{} |
| 364 | + b{{}} |
| 365 | + c{d} |
| 366 | + |
| 367 | +1. Output `{}` itself (since v0.6.0) |
| 368 | + |
| 369 | + $ echo abc | rush 'echo "{} {{}}"' |
| 370 | + abc {} |
| 371 | + |
354 | 372 | 1. Dirname (`{/}`) and basename (`{%}`) and remove custom suffix (`{^suffix}`) |
355 | 373 |
|
356 | 374 | $ echo dir/file_1.txt.gz | rush 'echo {/} {%} {^_1.txt.gz}' |
|
0 commit comments