summaryrefslogtreecommitdiff
path: root/std/examples/cat.ts
blob: 92d5ae39704ff36a88f5ca4f08b07202442af65a (plain)
1
2
3
4
5
6
7
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
const filenames = Deno.args.slice(1);
for (const filename of filenames) {
  const file = await Deno.open(filename);
  await Deno.copy(Deno.stdout, file);
  file.close();
}