summaryrefslogtreecommitdiff
path: root/std/examples/cat.ts
blob: 9e713d862b4777605c9f30ef938e2651ed5fa7c0 (plain)
1
2
3
4
5
6
7
// Copyright 2018-2019 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();
}