Files
tsvm/assets/disk0/tvdos/bin/writeto.js
2023-05-11 20:19:49 +09:00

11 lines
268 B
JavaScript

if (exec_args[1] === undefined) {
println("Usage: after a pipe,\n writeto filename")
return 0
}
if (!_G.shell.hasPipe()) {
println("Pipe not opened")
return 1
}
files.open(_G.shell.resolvePathInput(exec_args[1]).full).swrite(_G.shell.getPipe())