Skip to content

Instantly share code, notes, and snippets.

@TimToady
Created September 28, 2011 03:22
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 TimToady/1246913 to your computer and use it in GitHub Desktop.
Save TimToady/1246913 to your computer and use it in GitHub Desktop.
sub shell($cmd) {
my $proc = CLR::<System.Diagnostics.Process,System,PublicKeyToken=b77a5c561934e089>.new;
$proc.EnableRaisingEvents = False;
$proc.StartInfo.FileName = 'bash-c';
$proc.StartInfo.Arguments = $cmd;
$proc.Start();
$proc.WaitForExit();
}
bash-c:
#!/bin/bash
eval "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment