Skip to content

inline scripts can not be used to read data from stdin #9

@holgerbrandl

Description

@holgerbrandl

Example

kscript - <<"EOF"
println("getting started")
generateSequence() { readLine() }.map {
    if (!it.startsWith(">")) it else
        "huhu" + it
}.forEach { println(it) }
EOF

This won't work at the moment because stidin is used for both script and data.

Possible workaround: add -s option to provide script as parameter and skip stdin for script provision.

streamline further by using simple code wrapper for

kscript -st '"huhu" + it'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions