Skip to content

Commit 568a8fc

Browse files
committed
Merge pull request #2 from cosmo0920/add-doc-for-windows
doc: Add document for example setting description for Windows
2 parents 503d6d5 + 07f4c25 commit 568a8fc

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ You can use the combination of (INDEX, SEQID) as an unique identifier of a task.
2727

2828
## Example
2929

30+
### For UNIX/Linux
31+
3032
```yaml
3133
out:
3234
type: command
@@ -35,6 +37,26 @@ out:
3537
type: csv
3638
```
3739
40+
### For Windows
41+
42+
To refer Environment variables, you should use `${Env:ENVVAR}`.
43+
For example, in powershell, you can refer `INDEX` and `SEQID` environment variables, which are defined by `embulk-output-command`, like this:
44+
45+
```powershell
46+
${Env:INDEX} # refer INDEX environment variable
47+
${Env:SEQID} # refer SEQID environment variable
48+
```
49+
50+
Note that `${input}` equals to `cat -` in PowerShell.
51+
52+
```yaml
53+
out:
54+
type: command
55+
command: ${input} > task.${Env:INDEX}.${Env:SEQID}.csv
56+
formatter:
57+
type: csv
58+
```
59+
3860
## Build
3961

4062
```

0 commit comments

Comments
 (0)