Skip to content

Instantly share code, notes, and snippets.

@maxandersen
Created June 3, 2021 00:30
Show Gist options
  • Save maxandersen/607c84bc104b41824763ab05442247fd to your computer and use it in GitHub Desktop.
Save maxandersen/607c84bc104b41824763ab05442247fd to your computer and use it in GitHub Desktop.
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS https://github.com/maxandersen/fluent-process/tree/shell
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static com.ongres.process.FluentProcess.$;
public class test {
public static void main(String... args) {
$("ls -l | wc -l")
.inputStream(Stream.of("hello", "world"))
.pipe$("sed 's/world/process/'")
.stream()
.peek(System.out::println)
.collect(Collectors.toList());
}
}
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS https://github.com/maxandersen/fluent-process/tree/shell
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static com.ongres.process.FluentProcess.$;
{
$("ls -l | wc -l")
.inputStream(Stream.of("hello", "world"))
.pipe$("sed 's/world/process/'")
.stream()
.peek(System.out::println)
.collect(Collectors.toList());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment