34 lines
503 B
Plaintext
34 lines
503 B
Plaintext
params.str = "Hello world"
|
|
|
|
// Renamed from 'split' to 'split_text' to avoid Groovy method name conflict
|
|
process split_text {
|
|
input:
|
|
val x
|
|
|
|
output:
|
|
path 'chunk_*'
|
|
|
|
script:
|
|
"""
|
|
printf '${x}' | split -b 6 - chunk_
|
|
"""
|
|
}
|
|
|
|
process convert_to_upper {
|
|
input:
|
|
path y
|
|
|
|
output:
|
|
path 'upper_*'
|
|
|
|
script:
|
|
"""
|
|
cat $y | tr '[a-z]' '[A-Z]' > upper_${y}
|
|
"""
|
|
}
|
|
|
|
workflow {
|
|
main:
|
|
ch_str = channel.of(params.str)
|
|
ch_chunks = split_text(ch_str)
|
|
} |