1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-30 16:40:57 -05:00
denoland-deno/examples/cat.ts

12 lines
256 B
TypeScript
Raw Normal View History

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));