q/examples/readfile/readfile.q

13 lines
226 B
Plaintext

import fs
import sys
main() {
show("/proc/sys/kernel/ostype")
show("/proc/sys/kernel/osrelease")
show("/proc/sys/kernel/arch")
}
show(path []byte) {
contents, length := fs.readFile(path)
sys.write(1, contents, length)
}