-
-
Save AlexDaniel/1015a8072fb43442c81c to your computer and use it in GitHub Desktop.
Why use shell when you can pipe stuff using “run”?
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
#!/bin/bash | |
i=0 | |
while :; do | |
echo "hello! $i" | |
((i % 100 == 0)) && beep | |
((i++)) | |
done |
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 perl6 | |
my $out = run(‘./longoutput’, :out).out; | |
run(‘less’, :in($out)); | |
say ‘Finished!’; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment