Skip to content

Instantly share code, notes, and snippets.

@AlexDaniel
Last active January 3, 2016 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexDaniel/1015a8072fb43442c81c to your computer and use it in GitHub Desktop.
Save AlexDaniel/1015a8072fb43442c81c to your computer and use it in GitHub Desktop.
Why use shell when you can pipe stuff using “run”?
#!/bin/bash
i=0
while :; do
echo "hello! $i"
((i % 100 == 0)) && beep
((i++))
done
#!/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