This issue was reported by @casaroli and I'm just reporting here to avoid forgetting about it.
Works: ">"
nsh> ls / > /tmp/files.txt
nsh> cat /tmp/files.txt
/:
bin/
dev/
etc/
proc/
tmp/
nsh>
Works: ">>"
nsh> ls /dev >> /tmp/files.txt
nsh> cat /tmp/files.txt
/:
bin/
dev/
etc/
proc/
tmp/
/dev:
console
gpio0
gpio1
gpio2
gpio3
loop
null
oneshot
ram0
ram1
ram2
zero
nsh>
Doesn't work: "<"
nsh> cat < /tmp/files.txt
nsh: cat: open failed: 2
nsh>
Doesn't work: "|"
nsh> cat /tmp/files.txt | cat
/:
bin/
dev/
etc/
proc/
tmp/
nsh: cat: open failed: 2
nsh>
Doesn't work: "2>"
nsh> cat /tmp/doesexist.txt 2> /tmp/error.txt
nsh: cat: open failed: 2
nsh> ls -l /tmp
/tmp:
-rw-rw-rw- 122 files.txt
nsh>
This issue was reported by @casaroli and I'm just reporting here to avoid forgetting about it.
Works: ">"
nsh> ls / > /tmp/files.txt
nsh> cat /tmp/files.txt
/:
bin/
dev/
etc/
proc/
tmp/
nsh>
Works: ">>"
nsh> ls /dev >> /tmp/files.txt
nsh> cat /tmp/files.txt
/:
bin/
dev/
etc/
proc/
tmp/
/dev:
console
gpio0
gpio1
gpio2
gpio3
loop
null
oneshot
ram0
ram1
ram2
zero
nsh>
Doesn't work: "<"
nsh> cat < /tmp/files.txt
nsh: cat: open failed: 2
nsh>
Doesn't work: "|"
nsh> cat /tmp/files.txt | cat
/:
bin/
dev/
etc/
proc/
tmp/
nsh: cat: open failed: 2
nsh>
Doesn't work: "2>"
nsh> cat /tmp/doesexist.txt 2> /tmp/error.txt
nsh: cat: open failed: 2
nsh> ls -l /tmp
/tmp:
-rw-rw-rw- 122 files.txt
nsh>