read_stdin_to_string.js

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-10-08 00:00:03 +00:00
parent 1509c3bca4
commit c666d426f7
2 changed files with 7 additions and 0 deletions

View File

@@ -13194,6 +13194,7 @@ Examples:
** link:rootfs_overlay/lkmc/nodejs/command_line_arguments.js[]
* `fs`
** link:rootfs_overlay/lkmc/nodejs/file_write_read.js[]
** link:rootfs_overlay/lkmc/nodejs/read_stdin_to_string.js[] Question: https://stackoverflow.com/questions/30441025/read-all-text-from-stdin-to-a-string
=== Userland content bibliography

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env node
// https://cirosantilli.com/linux-kernel-module-cheat#node-js
const fs = require('fs');
console.log(fs.readFileSync(0, 'utf8'));