mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 01:02:09 +02:00
xe: add page (#8723)
This commit is contained in:
parent
7bbe5a1ff9
commit
09dc125988
1 changed files with 24 additions and 0 deletions
24
pages/common/xe.md
Normal file
24
pages/common/xe.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
# xe
|
||||
|
||||
> Execute a command once for each line piped from another command or file.
|
||||
> More information: <https://github.com/leahneukirchen/xe>.
|
||||
|
||||
- Run a command once for each line of input data as arguments:
|
||||
|
||||
`{{arguments_source}} | xe {{command}}`
|
||||
|
||||
- Execute the commands, replacing any occurrence of the placeholder (marked as `{}`) with the input line:
|
||||
|
||||
`{{arguments_source}} | xe {{command}} {} {{optional_extra_arguments}}`
|
||||
|
||||
- Execute a shellscript, joining every `N` lines into a single call:
|
||||
|
||||
`echo -e 'a\nb' | xe -N{{2}} -s 'echo $2 $1'`
|
||||
|
||||
- Delete all files with a `.backup` extension:
|
||||
|
||||
`find . -name {{'*.backup'}} | xe rm -v`
|
||||
|
||||
- Run up to `max-jobs` processes in parallel; the default is 1. If `max-jobs` is 0, xe will run as many processes as cpu cores:
|
||||
|
||||
`{{arguments_source}} | xe -j {{max-jobs}} {{command}}`
|
Loading…
Add table
Reference in a new issue