summaryrefslogtreecommitdiff
path: root/examples/cat.ts
blob: d8862d4249c3893d3d3a380a09402d350e9d3fdd (plain)
1
2
3
4
5
6
7
8
9
10
11
import * as deno from "deno";

async function cat(filenames: string[]): Promise<void> {
  for (let filename of filenames) {
    let file = await deno.open(filename);
    await deno.copy(deno.stdout, file);
    file.close();
  }
}

cat(deno.args.slice(1));