mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-13 08:04:03 +09:00
some new commands; lfs wip
This commit is contained in:
13
assets/disk0/tvdos/bin/tee.js
Normal file
13
assets/disk0/tvdos/bin/tee.js
Normal file
@@ -0,0 +1,13 @@
|
||||
if (exec_args[1] === undefined) {
|
||||
println("Usage: after a pipe,\n tee filename")
|
||||
return 0
|
||||
}
|
||||
|
||||
if (!_G.shell.hasPipe()) {
|
||||
println("Pipe not opened")
|
||||
return 1
|
||||
}
|
||||
|
||||
let txt = _G.shell.getPipe()
|
||||
files.open(_G.shell.resolvePathInput(exec_args[1]).full).swrite(txt)
|
||||
print(txt)
|
||||
Reference in New Issue
Block a user