-
Is this possible? version: 3
tasks:
default:
sources:
- './conf/**/*.rcl'
cmds:
- for: sources
vars:
FILE:
sh: basename {{ .ITEM }}
cmd: 'rcl e --format json {{ .ITEM }} > {{ .FILE }}.json' |
Beta Was this translation helpful? Give feedback.
Answered by
trulede
May 31, 2025
Replies: 2 comments 2 replies
-
Yes, you can do this: version: '3'
tasks:
default:
sources:
- '*.txt'
cmds:
- for: sources
task: item
vars:
FILE: '{{.ITEM}}'
item:
cmds:
- echo '{{.FILE}}' More examples here: https://taskfile.dev/usage/#renaming-variables |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
yonas
-
Hello, version: 3
tasks:
default:
sources:
- './conf/**/*.rcl'
cmds:
- for: sources
cmd: 'echo FILE : {{ base .ITEM }} Full path : {{.ITEM}}' It will print : |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, you can do this:
More examples here: https://taskfile.dev/usage/#renaming-variables