Created
June 3, 2021 00:30
-
-
Save maxandersen/607c84bc104b41824763ab05442247fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///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()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///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