Skip to content

Instantly share code, notes, and snippets.

@colomon
Last active March 14, 2018 20:01
Show Gist options
  • Save colomon/d358b768442a8e78dfd6814a61b45ff8 to your computer and use it in GitHub Desktop.
Save colomon/d358b768442a8e78dfd6814a61b45ff8 to your computer and use it in GitHub Desktop.
use v6;
my $files-file = "files.list";
my $zip-name = "for-abc-" ~ Date.new(now) ~ ".zip";
my $zip = Proc::Async.new(:w, 'zip', $zip-name, '-@');
my $promise = $zip.start;
for $files-file.IO.lines() -> $line {
await $zip.say: $line;
}
$zip.close-stdin;
await $promise;
$zip-name.IO.copy("/Users/colomon/Google Drive/ABC Work/" ~ $zip-name);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment