mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-22 17:55:57 +01:00
read_stdin_to_string.js
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
6
rootfs_overlay/lkmc/nodejs/read_stdin_to_string.js
Executable file
6
rootfs_overlay/lkmc/nodejs/read_stdin_to_string.js
Executable 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'));
|
||||
Reference in New Issue
Block a user